Project: Eclipse_Platform_UI
Bug 370026 NPE in PartActivationHistory.activate() in almost fresh 4.2M5
Reported: 2012-01-27 18:25:02 | Status: verified fixed

I've seen some similar stack traces but couldn't identify any clear duplicate, so here it comes: Freshly installed Eclipse SDK 4.2 M5 Added some more stuff: Object Teams, EGit, Mylyn (assorted) Restart and immediately get this NPE (reported via an InjectionException): java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:560) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:531) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:520) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:950) at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:959) at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:938) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3442) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3439) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3415) at org.eclipse.ui.internal.WorkbenchIntroManager.createIntro(WorkbenchIntroManager.java:178) at org.eclipse.ui.internal.WorkbenchIntroManager.showIntro(WorkbenchIntroManager.java:125) at org.eclipse.ui.application.WorkbenchWindowAdvisor.openIntro(WorkbenchWindowAdvisor.java:190) at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.openIntro(IDEWorkbenchWindowAdvisor.java:564) at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:610) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) I haven't even started using Eclipse, so I can't say if/what functionality actually suffers.

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/HeadlessContextPresentationEngine.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/SimpleView.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/TargetedView.java