Project: Eclipse_Platform_UI
Bug 217217 [KeyBindings] NPE in WidgetMethodHandler during shutdown
Reported: 2008-01-31 02:00:21 | Status: verified fixed

Build ID: I20071213-1700 Steps To Reproduce: 1. This happens in automated tests sometimes during shutdown. More information: Here is the trace, fix looks pretty simple, it's checking for focus when the display is gone. I will provide a patch. Thread [main] (Suspended (exception NullPointerException)) WidgetMethodHandler.getMethodToExecute() line: 193 WidgetMethodHandler.isEnabled() line: 184 HandlerProxy.isEnabled() line: 264 Command.isEnabled() line: 831 Command.setHandler(IHandler) line: 938 HandlerAuthority.updateCommand(String, IHandlerActivation) line: 535 HandlerAuthority.deactivateHandler(IHandlerActivation) line: 256 HandlerService.deactivateHandler(IHandlerActivation) line: 144 HandlerService.deactivateHandlers(Collection) line: 153 HandlerPersistence.clearActivations(IHandlerService) line: 101 HandlerPersistence.dispose() line: 107 HandlerService.dispose() line: 159 ServiceLocator.dispose() line: 133 Workbench.shutdown() line: 2722 Workbench.busyClose(boolean) line: 924 Workbench.access$15(Workbench, boolean) line: 841 Workbench$22.run() line: 1085 BusyIndicator.showWhile(Display, Runnable) line: 67 Workbench.close(int, boolean) line: 1083 Workbench.close() line: 1055 WorkbenchTestable$2.run() line: 121 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 130 Display.runAsyncMessages(boolean) line: 3312 Display.readAndDispatch() line: 2985 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2381 Workbench.runUI() line: 2345 Workbench.access$4(Workbench) line: 2211 Workbench$4.run() line: 473 Realm.runWithDefault(Realm, Runnable) line: 288 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 468 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 TestMainWindow.start(IApplicationContext) line: 464 UITestApplication.start(IApplicationContext) line: 52 EclipseAppHandle.run(Object) line: 193 EclipseAppLauncher.runApplication(Object) line: 106 EclipseAppLauncher.start(Object) line: 76 EclipseStarter.run(Object) line: 362 EclipseStarter.run(String[], Runnable) line: 175 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: 585 Main.invokeFramework(String[], URL[]) line: 561 Main.basicRun(String[]) line: 501 Main.run(String[]) line: 1239 Main.main(String[]) line: 1215

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