Project: Eclipse_Platform_UI
Bug 314341 [Compatibility] Closing last view throws exception
Reported: 2010-05-25 15:36:36 | Status: resolved fixed

I had moved the Outline view out of its location, and the stack didn't go away. When I restarted, the Templates view appeared in that location. When I closed the templates view I get the following error: bash-3.2$ 2010-05-25 15:36:33.416 Log ErrorException while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/toBeRendered/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@bd30bd3 java.lang.NullPointerException at org.eclipse.e4.ui.workbench.addons.cleanupaddon.CleanupAddon$2.handleEvent(CleanupAddon.java:77) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:41) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:188) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:198) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:139) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:73) at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:58) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl.setToBeRendered(PartImpl.java:532) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.hidePart(PartServiceImpl.java:618) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer$4.close(StackRenderer.java:430) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1590) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:261) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1234) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$3.run(PartRenderingEngine.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:438) at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:97) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:534) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:520) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/cleanupaddon/CleanupAddon.java bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java