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)
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
private AbstractPartRenderer getRenderer(MUIElement uiElement, Object parent) {
		return curFactory.getRenderer(uiElement, parent);
	}
	protected AbstractPartRenderer getRendererFor(MUIElement element) {
		return (AbstractPartRenderer) element.getRenderer();
	}
	public Object run(final MApplicationElement uiRoot,
			final IEclipseContext runContext) {
		final Display display = Display.getDefault();
		Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
			public void run() {
				initializeStyling(display, runContext);
				
				runContext.set(IResourceUtilities.class.getName(),
						new ResourceUtility());
				
				KeyBindingDispatcher dispatcher = (KeyBindingDispatcher) ContextInjectionFactory
						.make(KeyBindingDispatcher.class, runContext);
				runContext.set(KeyBindingDispatcher.class.getName(), dispatcher);
				keyListener = dispatcher.getKeyDownFilter();
				display.addFilter(SWT.KeyDown, keyListener);
				display.addFilter(SWT.Traverse, keyListener);
				menuServiceFilter = ContextInjectionFactory.make(
						MenuServiceFilter.class, runContext);
				display.addFilter(SWT.Show, menuServiceFilter);
				display.addFilter(SWT.Hide, menuServiceFilter);
				display.addFilter(SWT.Dispose, menuServiceFilter);
				runContext.set(MenuServiceFilter.class, menuServiceFilter);