Project: Eclipse_Platform_UI
Bug 319300 [Compatibility] exiting causes NPE in compute function
Reported: 2010-07-08 14:23:32 | Status: resolved fixed

Working from HEAD. I quit and got 2 errors. Clearing the context is causing an application level CompFunction to NPE. !ENTRY org.eclipse.ui.workbench 4 2 2010-07-08 14:22:20.286 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.swt.E4Application$2.compute(E4Application.java:419) at org.eclipse.e4.core.internal.contexts.ValueComputation.get(ValueComputation.java:122) at org.eclipse.e4.core.internal.contexts.EclipseContext.internalGet(EclipseContext.java:254) at org.eclipse.e4.core.internal.contexts.EclipseContext.get(EclipseContext.java:215) at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier.get(ContextObjectSupplier.java:148) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveArgs(InjectorImpl.java:369) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:324) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveArguments(InjectorImpl.java:298) at org.eclipse.e4.core.internal.di.Requestor.resolveArguments(Requestor.java:108) at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:44) at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:90) at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:333) at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:350) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.clearContext(PartRenderingEngine.java:560) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:515) at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1439) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:1140) at org.eclipse.ui.internal.WorkbenchWindow.access$9(WorkbenchWindow.java:1119) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1166) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1164) at org.eclipse.ui.internal.Workbench$13.run(Workbench.java:1017) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1011) at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:945) at org.eclipse.ui.internal.Workbench$14.run(Workbench.java:1087) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1058) at org.eclipse.ui.internal.handlers.QuitHandler.execute(QuitHandler.java:36) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:47) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:199) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:176) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:101) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:135) at org.eclipse.e4.ui.workbench.renderers.swt.HandledMenuItemRenderer$1.widgetSelected(HandledMenuItemRenderer.java:150) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3552) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3171) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:669) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:594) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:103) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:535) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:519) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java