Project: Eclipse_Platform_UI
Bug 222627 [ActivityMgmt] Stack overflow after hooking in property tester to activities
Reported: 2008-03-13 14:02:09 | Status: verified fixed

Build ID: Build id: I20080312-1200 Steps To Reproduce: 1. I have defined a property tester, like this: <extension point="org.eclipse.core.expressions.propertyTesters"> <propertyTester class="com.sas.bistudio.BIRolesTester" id="com.sas.BIRolesTester" namespace="com.sas" properties="BITester" type="java.lang.Object"> </propertyTester> </extension> 2. I have activities defined, such as: <extension point="org.eclipse.ui.activities"> <activity id="com.sas.bistudio.perspectives.studioUser" name="blah"> <enabledWhen> <test property="com.sas.BITester" args="Studio User" forcePluginActivation="true"/> </enabledWhen> </activity> <activityPatternBinding activityId="com.sas.bistudio.perspectives.studioUser" pattern="BIStudio/BIStudio\.StudioPerspective"> </activityPatternBinding> </extension> 3. If my property tester returns true, I get the stack overflow. If the tester returns false, I do not (although the perspective is unavailable at that point). 4. I get a stack overflow error This code worked with the v02 patch from defect 201052. I had to make one small code change (unrelated I believe) and no xml changes to compile against the 0312 integration release. The other defect was closed and we were told to try out the release and file a new bug if there were problems. So it's entirely possible that I haven't supplied some data properly. Also, this integration release has errors in the tests (on Windows), but I don't know if that affects this problem. More information: Here is a clip from the exception that shows the cycle: at org.eclipse.ui.internal.activities.MutableActivityManager.getRequiredActivityIds(MutableActivityManager.java:194) at org.eclipse.ui.internal.activities.MutableActivityManager.setEnabledActivityIds(MutableActivityManager.java:524) at org.eclipse.ui.internal.activities.MutableActivityManager$2.propertyChange(MutableActivityManager.java:591) at org.eclipse.ui.internal.services.EvaluationAuthority.firePropertyChange(EvaluationAuthority.java:236) at org.eclipse.ui.internal.services.EvaluationAuthority.addEvaluationListener(EvaluationAuthority.java:80) at org.eclipse.ui.internal.services.EvaluationService.addEvaluationListener(EvaluationService.java:46) at org.eclipse.ui.internal.activities.MutableActivityManager.updateActivity(MutableActivityManager.java:626) at org.eclipse.ui.internal.activities.MutableActivityManager.getActivity(MutableActivityManager.java:140) at org.eclipse.ui.internal.activities.MutableActivityManager.getRequiredActivityIds(MutableActivityManager.java:194) at org.eclipse.ui.internal.activities.MutableActivityManager.setEnabledActivityIds(MutableActivityManager.java:524) at org.eclipse.ui.internal.activities.MutableActivityManager$2.propertyChange(MutableActivityManager.java:591) at org.eclipse.ui.internal.services.EvaluationAuthority.firePropertyChange(EvaluationAuthority.java:236) at org.eclipse.ui.internal.services.EvaluationAuthority.addEvaluationListener(EvaluationAuthority.java:80) at org.eclipse.ui.internal.services.EvaluationService.addEvaluationListener(EvaluationService.java:46) at org.eclipse.ui.internal.activities.MutableActivityManager.updateActivity(MutableActivityManager.java:626) at org.eclipse.ui.internal.activities.MutableActivityManager.getActivity(MutableActivityManager.java:140) at org.eclipse.ui.internal.activities.MutableActivityManager.getRequiredActivityIds(MutableActivityManager.java:194)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java