Bug 326699 Part in shared area finds wrong parent context during shutdown
Build: 4.1 M2. After working for a couple of days, I attempted to shutdown and got an NPE. I was unable to close the application normally and had to kill the process. Complete log to follow but here is a snippet: java.lang.NullPointerException at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1322) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:1059) at org.eclipse.ui.internal.WorkbenchWindow.access$9(WorkbenchWindow.java:1038) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1085) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
}
	public void testCreateGuiBug301021() throws Exception {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		
		MPartDescriptor descriptor = org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicFactoryImpl.eINSTANCE
				.createPartDescriptor();
		descriptor
				.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		descriptor.setElementId("part");
		descriptor.setCategory("aStack");
		application.getDescriptors().add(descriptor);
		MPartDescriptor descriptor2 = org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicFactoryImpl.eINSTANCE
				.createPartDescriptor();
		descriptor2
				.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		descriptor2.setElementId("part2");
		descriptor2.setCategory("aStack");
		application.getDescriptors().add(descriptor2);
		
		
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		MPartSashContainer partSashContainer = BasicFactoryImpl.eINSTANCE
				.createPartSashContainer();
		MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
		
		stack.setElementId("aStack");
		partSashContainer.getChildren().add(stack);