Bug 320791 NPE on workbench shutdown
This happens for me on rc3 when shuting down: java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.notifyListeners(SelectionServiceImpl.java:192) at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.access$3(SelectionServiceImpl.java:191) at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl$2.changed(SelectionServiceImpl.java:230) at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:95) at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:333) at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:350) at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$2.run(ShellActivationListener.java:127) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.activate(ShellActivationListener.java:124) at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.handleEvent(ShellActivationListener.java:74)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionServiceImpl.java
static final String OUT_SELECTION = "output.selection"; 
	private ListenerList genericListeners = new ListenerList();
	private Map<String, ListenerList> targetedListeners = new HashMap<String, ListenerList>();
	private Set<IEclipseContext> tracked = new HashSet<IEclipseContext>();
	@Inject
	private IEclipseContext context;
	@Inject
	private EPartService partService;
	/**
	 * This is the specific implementation. TODO: generalize it
	 */
	@Inject
	@Named(EPartService.PART_SERVICE_ROOT)
	private MContext serviceRoot;
	@Inject
	private IEventBroker eventBroker;
	private EventHandler eventHandler = new EventHandler() {
		public void handleEvent(Event event) {
			Object element = event.getProperty(UIEvents.EventTags.ELEMENT);
			if (element instanceof MPart) {
				MPart part = (MPart) element;
				IEclipseContext context = part.getContext();
				if (context != null && isInContainer(part)) {
					track(part);
				}