Project: Eclipse_Platform_UI
Bug 306045 [Compatibility] NPE thrown when restoring Eclipse with a 'Console' view open
Reported: 2010-03-16 13:07:10 | Status: resolved fixed

org.eclipse.e4.core.services.internal.context.InjectionException: Unexpected error invoking method "setPart" at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:66) at org.eclipse.e4.core.services.internal.context.InjectionMethod.notify(InjectionMethod.java:44) at org.eclipse.e4.core.services.internal.context.EclipseContext$TrackableComputationExt.notify(EclipseContext.java:175) at org.eclipse.e4.core.services.internal.context.EclipseContext.processScheduled(EclipseContext.java:461) at org.eclipse.e4.core.services.internal.context.EclipseContext.set(EclipseContext.java:483) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.activate(PartServiceImpl.java:320) at org.eclipse.e4.ui.workbench.swt.internal.AbstractPartRenderer.activate(AbstractPartRenderer.java:136) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer$5.widgetSelected(StackRenderer.java:409) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:773) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2722) at org.eclipse.swt.custom.CTabFolder.onFocus(CTabFolder.java:1306) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:253) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2597) at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2399) at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:4771) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4208) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4843) at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method) at org.eclipse.swt.widgets.Control.forceFocus(Control.java:978) at org.eclipse.swt.widgets.Control.setFixedFocus(Control.java:2959) at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:1039) at org.eclipse.swt.widgets.Control.fixFocus(Control.java:936) at org.eclipse.swt.widgets.Control.setVisible(Control.java:3386) at org.eclipse.swt.custom.CTabItem.setControl(CTabItem.java:301) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.createTab(StackRenderer.java:277) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.childRendered(StackRenderer.java:322) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:355) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.showTab(StackRenderer.java:455) at org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:98) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:347) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.workbench.ui.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:56) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:343) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.workbench.ui.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:56) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:343) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.workbench.ui.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:56) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:343) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.workbench.ui.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:100) at org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:98) at org.eclipse.e4.workbench.ui.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:74) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:347) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.workbench.ui.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:56) at org.eclipse.e4.workbench.ui.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:397) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:343) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:393) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$5.run(PartRenderingEngine.java:528) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:473) at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:100) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:526) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:512) 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:37) 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:1406) at org.eclipse.equinox.launcher.Main.main(Main.java:1382) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at org.eclipse.e4.core.services.internal.context.InjectionMethod.callMethod(InjectionMethod.java:102) at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:63) ... 80 more Caused by: java.lang.NullPointerException at org.eclipse.ui.internal.contexts.ContextService.deactivateContext(ContextService.java:147) at org.eclipse.ui.internal.console.ConsoleView.partDeactivated(ConsoleView.java:693) at org.eclipse.ui.internal.WorkbenchPage.firePartDeactivated(WorkbenchPage.java:2470) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2459) at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partDeactivated(WorkbenchPage.java:125) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.firePartDeactivated(PartServiceImpl.java:177) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.setPart(PartServiceImpl.java:125)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java