Community
Participate
Working Groups
1. Window > New Window 2. Go back to the first one. 3. Close it. 4. Activate the new one. 5. An error occurs. It seems usable after dismissing the initial error dialog though. org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:795) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:104) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:74) at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:72) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1149) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1123) at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:932) at org.eclipse.ui.internal.services.WorkbenchSourceProvider.getCurrentState(WorkbenchSourceProvider.java:133) at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:692) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1635) at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2114) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4157) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2038) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3024) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3652) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:712) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:632) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:106) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:541) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:525) 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:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) 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) Caused by: java.lang.NullPointerException at org.eclipse.ui.internal.ide.WorkbenchActionBuilder.fillStatusLine(WorkbenchActionBuilder.java:907) at org.eclipse.ui.application.ActionBarAdvisor.fillActionBars(ActionBarAdvisor.java:157) at org.eclipse.ui.internal.ide.WorkbenchActionBuilder.fillActionBars(WorkbenchActionBuilder.java:335) at org.eclipse.ui.internal.WorkbenchWindow.fillActionBars(WorkbenchWindow.java:1939) at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:474) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:47) ... 46 more
Still in I20100723-1415 PW
This is because after the first window has been closed, the application still has that window set as the selected element. Thus, when we query for the active workbench window, we try to return that invalid window.
Created attachment 175260 [details] Patch that surgically detects a 'bogus' case and skips it Not a true fix but fixes at least this scenario and is, I think, safe...
Created attachment 175269 [details] WorkbenchWindow patch v1
This is +1 for me, it's certainly better than what's there...
+1 from me too.
(In reply to comment #4) > Created an attachment (id=175269) [details] > WorkbenchWindow patch v1 Fix released to CVS HEAD.
Verified with I20100726-2152 on Windows XP.