| Summary: | [DynamicGUI] UIExtensionTracker calling Display.syncExec() on disposed Display | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Tom Houser <tmhouser> | ||||||
| Component: | UI | Assignee: | Eric Moffatt <emoffatt> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | Eric Moffatt <emoffatt> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bokowski, pwebster | ||||||
| Version: | 3.6 | Flags: | pwebster:
review+
bokowski: review+ |
||||||
| Target Milestone: | 3.6.2 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 398909 | ||||||||
| Attachments: |
|
||||||||
|
Description
Tom Houser
Created attachment 180786 [details]
Check if the Display is disposed
Paul / Boris, could you please take a look at this (very simple) patch and vote ? Tom, where are you in the shutdown cycle that you are removing extensions? PW (In reply to comment #1) > Created an attachment (id=180786) [details] > Check if the Display is disposed Eric, it looks good. I'd add the same thing to the applyAdd(*) method as well. PW Re: comment 3 Paul, as I stated in the description. The app dynamically unloads plugins with extensions (that were dynamically loaded earlier in the app's execution)immediately before the shutdown cycle. Since the extension registry uses jobs (i.e. ExtensionEventDispatcherJob) to fire registry events (i.e. the "remove" events caused by the dynamic unloading of plugins with extensions), there is a race condition between the worker thread that is running the ExtensionEventDispatcherJob and the main UI thread which is subsequently shutdown. The patch looks good to me (and I agree with Paul that the same change should be made to applyAdd()). (In reply to comment #5) > Re: comment 3 > > Paul, as I stated in the description. The app dynamically unloads plugins with > extensions (that were dynamically loaded earlier in the app's I'm asking about the trigger: WorkbenchAdvisor#preShutdown()? What event causes the dynamic unloading to begin? Is it related to the workbench shutdown cycle at all, or an external stimulus? PW Looks good to me (and yes, please add the same check to the add method as well) Re: comment 6 The trigger is not related to the workbench shutdown cycle. The trigger occurs before the workbench is shutdown. The RCP application programmatically makes the necessary calls to unload the bundles that it had dynamically loaded earlier in its execution and then explicitly calls PlatformUI.getWorkbench().close() to shutdown the app. To dynamically install plugins, we use org.osgi.framework.BundleContext.installBundle(String) followed by org.osgi.service.packageadmin.PackageAdmin.refreshPackages(Bundle[]). To dynamically uninstall plugins, we use org.osgi.framework.Bundle.stop(), followed by org.osgi.framework.Bundle.uninstall(), followed by org.osgi.service.packageadmin.PackageAdmin.refreshPackages(Bundle[]). The RCP app is presenting a wizard dialog. On the wizard pages, there is a Cancel button. The user clicks on Cancel. This triggers code that unloads the bundles and then calls PlatformUI.getWorkbench().close(). (In reply to comment #8) > The trigger is not related to the workbench shutdown cycle. The trigger occurs > before the workbench is shutdown. The RCP application programmatically makes > the necessary calls to unload the bundles that it had dynamically loaded > earlier in its execution and then explicitly calls > PlatformUI.getWorkbench().close() to shutdown the app. Thanx Tom, That seems reasonable behaviour. PW Created attachment 180887 [details]
Patch that checks for 'isDisposed' in both methods
Committed in >20101014. Applied the patch to the maintenance branch. In M20110119-0834 PW |