Project: Eclipse_Platform_UI
Bug 311360 [Compatibility] All views become materialized during shutdown
Reported: 2010-05-03 08:24:32 | Status: resolved fixed

1. Start your inner and open the 'Navigator'. 2. "Hide" it by putting another view in the stack as the selected element. 3. Close. 4. Restart. 5. Close again. 6. An NPE will be thrown. This is because we invoke getViews() during shutdown which will force the rendering of all views. :( java.lang.NullPointerException at org.eclipse.ui.actions.WorkingSetFilterActionGroup.<init>(WorkingSetFilterActionGroup.java:130) at org.eclipse.ui.views.navigator.MainActionGroup.makeSubGroups(MainActionGroup.java:215) at org.eclipse.ui.views.navigator.MainActionGroup.<init>(MainActionGroup.java:103) at org.eclipse.ui.views.navigator.ResourceNavigator.makeActions(ResourceNavigator.java:1025) at org.eclipse.ui.views.navigator.ResourceNavigator.createPartControl(ResourceNavigator.java:322) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:115) at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:71) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:168) 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.e4.core.internal.di.MethodRequestor.callMethod(MethodRequestor.java:57) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:32) at org.eclipse.e4.core.internal.di.InjectorImpl.processPostConstruct(InjectorImpl.java:608) at org.eclipse.e4.core.internal.di.InjectorImpl.processPostConstruct(InjectorImpl.java:591) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:88) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:245) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:199) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:192) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:131) at org.eclipse.e4.workbench.ui.internal.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:183) at org.eclipse.e4.workbench.ui.internal.ReflectionContributionFactory.create(ReflectionContributionFactory.java:159) at org.eclipse.e4.workbench.ui.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:57) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createWidget(PartRenderingEngine.java:434) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:323) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:385) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:439) at org.eclipse.ui.internal.ViewReference.getView(ViewReference.java:49) at org.eclipse.ui.internal.WorkbenchPage.getViews(WorkbenchPage.java:1523) at org.eclipse.ui.internal.WorkbenchPage.saveAllEditors(WorkbenchPage.java:1892) at org.eclipse.ui.internal.WorkbenchPage.saveAllEditors(WorkbenchPage.java:1882) at org.eclipse.ui.internal.Workbench.saveAllEditors(Workbench.java:1016) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:956) at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:940) at org.eclipse.ui.internal.Workbench$13.run(Workbench.java:1057) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1055) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1028) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:648) at org.eclipse.ui.internal.WorkbenchWindow.access$2(WorkbenchWindow.java:630) at org.eclipse.ui.internal.WorkbenchWindow$4.run(WorkbenchWindow.java:677) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:675) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:687) at org.eclipse.ui.internal.WorkbenchWindow$3.close(WorkbenchWindow.java:343) at org.eclipse.e4.workbench.ui.renderers.swt.WBWRenderer$8.shellClosed(WBWRenderer.java:400)

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