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
eventBroker.unsubscribe(trimHandler);
	}
	private static void populateModelInterfaces(MContext contextModel,
			IEclipseContext context, Class<?>[] interfaces) {
		for (Class<?> intf : interfaces) {
			Activator.trace(Policy.DEBUG_CONTEXTS,
					"Adding " + intf.getName() + " for " 
							+ contextModel.getClass().getName(), null);
			context.set(intf.getName(), contextModel);
			populateModelInterfaces(contextModel, context, intf.getInterfaces());
		}
	}
	private String getContextName(MUIElement element) {
		StringBuilder builder = new StringBuilder(element.getClass()
				.getSimpleName());
		String elementId = element.getElementId();
		if (elementId != null && elementId.length() != 0) {
			builder.append(" (").append(elementId).append(") ");
		}
		builder.append("Context");
		return builder.toString();
	}
	public Object createGui(MUIElement element, Object parentWidget,
			IEclipseContext parentContext) {
		if (!element.isToBeRendered())
			return null;
		if (!renderedElements.contains(element))
			renderedElements.add(element);
		
		if (removeRoot != null) {