Project: Eclipse_Platform_UI
Bug 175261 [Contributions] NPE in command service
Reported: 2007-02-23 07:46:59 | Status: verified fixed

While closing the workbench I got an NPE in the command service that left the workspace locked. !ENTRY org.eclipse.ui 4 0 2007-02-23 07:39:28.273 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.commands.CommandService.refreshElements(CommandService.java:219) at org.eclipse.ui.internal.handlers.HandlerAuthority.updateCommand(HandlerAuthority.java:495) at org.eclipse.ui.internal.handlers.HandlerAuthority.deactivateHandler(HandlerAuthority.java:223) at org.eclipse.ui.internal.handlers.HandlerService.deactivateHandler(HandlerService.java:143) at org.eclipse.ui.internal.handlers.HandlerService.deactivateHandlers(HandlerService.java:152) at org.eclipse.ui.internal.handlers.HandlerPersistence.clearActivations(HandlerPersistence.java:101) at org.eclipse.ui.internal.handlers.HandlerPersistence.dispose(HandlerPersistence.java:107) at org.eclipse.ui.internal.handlers.HandlerService.dispose(HandlerService.java:158) at org.eclipse.ui.internal.services.ServiceLocator.dispose(ServiceLocator.java:95) at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2615) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:879) at org.eclipse.ui.internal.Workbench.access$15(Workbench.java:796) at org.eclipse.ui.internal.Workbench$22.run(Workbench.java:1040) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1038) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1010) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:624) at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:603) at org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindow.java:718) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:716) at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:736) at org.eclipse.jface.window.Window$3.shellClosed(Window.java:682) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:91) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1097) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1121) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1106) at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:542) at org.eclipse.swt.widgets.Shell.gtk_delete_event(Shell.java:871) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1470) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3879) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3870) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5574) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1155) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1468) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2286) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2250) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2125) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:459) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:454) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124) at org.eclipse.equinox.launcher.Main.main(Main.java:1099)

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