Community
Participate
Working Groups
3.8 and 4.2. During shutdown, the handlers are deactivated. During that, HandlerProxy.isEnabled() gets called, which might cause plug-ins to be loaded: Thread [main] (Suspended (breakpoint at line 259 in CompareUIPlugin)) CompareUIPlugin.start(BundleContext) line: 259 BundleContextImpl$1.run() line: 711 AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] BundleContextImpl.startActivator(BundleActivator) line: 702 BundleContextImpl.start() line: 683 BundleHost.startWorker(int) line: 381 BundleHost(AbstractBundle).start(int) line: 300 SecureAction.start(Bundle, int) line: 440 BundleLoader.setLazyTrigger() line: 263 EclipseLazyStarter.postFindLocalClass(String, Class, ClasspathManager) line: 107 ClasspathManager.findLocalClass(String) line: 469 DefaultClassLoader.findLocalClass(String) line: 216 BundleLoader.findLocalClass(String) line: 395 SingleSourcePackage.loadClass(String) line: 35 BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 461 BundleLoader.findClass(String, boolean) line: 421 BundleLoader.findClass(String) line: 412 DefaultClassLoader.loadClass(String, boolean) line: 107 DefaultClassLoader(ClassLoader).loadClass(String) line: 247 Class<T>.getDeclaredConstructors0(boolean) line: not available [native method] Class<T>.privateGetDeclaredConstructors(boolean) line: 2389 Class<T>.getConstructor0(Class[], int) line: 2699 Class<T>.newInstance0() line: 326 Class<T>.newInstance() line: 308 EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 184 ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 905 ConfigurationElement.createExecutableExtension(String) line: 243 ConfigurationElementHandle.createExecutableExtension(String) line: 55 HandlerProxy.loadHandler() line: 350 HandlerProxy.isEnabled() line: 319 Command.isEnabled() line: 862 Command.setHandler(IHandler) line: 994 HandlerAuthority.updateCommand(String, IHandlerActivation) line: 457 HandlerAuthority.deactivateHandler(IHandlerActivation) line: 312 HandlerService.deactivateHandler(IHandlerActivation) line: 148 HandlerService.deactivateHandlers(Collection) line: 157 HandlerPersistence.clearActivations(IHandlerService) line: 104 HandlerPersistence.dispose() line: 125 HandlerService.dispose() line: 163 ServiceLocator.dispose() line: 142 Workbench.shutdown() line: 3057 Workbench.busyClose(boolean) line: 1123 Workbench.access$15(Workbench, boolean) line: 1040 Workbench$25.run() line: 1284 BusyIndicator.showWhile(Display, Runnable) line: 70 Workbench.close(int, boolean) line: 1282 Workbench.close() line: 1254 QuitHandler.execute(ExecutionEvent) line: 41 HandlerProxy.execute(ExecutionEvent) line: 293 Command.executeWithChecks(ExecutionEvent) line: 499 ParameterizedCommand.executeWithChecks(Object, Object) line: 508 HandlerService.executeCommand(ParameterizedCommand, Event) line: 169 SlaveHandlerService.executeCommand(ParameterizedCommand, Event) line: 241 ActionFactory$WorkbenchCommandAction(CommandAction).runWithEvent(Event) line: 157 ActionContributionItem.handleWidgetSelection(Event, boolean) line: 584 ActionContributionItem.access$2(ActionContributionItem, Event, boolean) line: 501 ActionContributionItem$5.handleEvent(Event) line: 411 EventTable.sendEvent(Event) line: 84 MenuItem(Widget).sendEvent(Event) line: 1053 Display.runDeferredEvents() line: 4169 Display.readAndDispatch() line: 3758 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2701 Workbench.runUI() line: 2665 Workbench.access$4(Workbench) line: 2499 Workbench$7.run() line: 679 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 668 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 124 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 353 EclipseStarter.run(String[], Runnable) line: 180 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 629 Main.basicRun(String[]) line: 584 Main.run(String[]) line: 1438 Main.main(String[]) line: 1414
Created attachment 219167 [details] Fix
The patch looks OK, but I couldn't find a scenario where the Compare plug-in was only loaded on shut-down. Do you have an example?
(In reply to comment #2) > The patch looks OK, but I couldn't find a scenario where the Compare plug-in > was only loaded on shut-down. Do you have an example? 1. get latest EGit (important) 2. start new workspace 3. add a project ==> loads EGit due to decorator 4. exit ==> loads Compare UI
Patch is good and solves the problem. OK for 3.8.1 and 4.2.1/4.3
Fixed in 'master' with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ff19cb46634007246799ee509c8eae79aa5020c4 Fixed in 'R3_8_maintenance' with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=980fab40c01d7158b821363c93060484cce0ca33
Verified in M20120815-1000 and M20120815-1200.