Project: Eclipse_Platform_UI
Bug 305852 [Compatibility] NPE thrown when closing all editors
Reported: 2010-03-15 10:02:47 | Status: resolved fixed

1. Open a file. 2. File > Close All 3. NPE is logged though the editor is closed as expected. java.lang.NullPointerException at org.eclipse.ui.part.PageBookView$4.partHidden(PageBookView.java:1027) at org.eclipse.ui.internal.WorkbenchPage.firePartHidden(WorkbenchPage.java:2517) at org.eclipse.ui.internal.WorkbenchPage.access$7(WorkbenchPage.java:2510) at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partHidden(WorkbenchPage.java:129) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.firePartHidden(PartServiceImpl.java:183) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.access$1(PartServiceImpl.java:181) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl$1.handleEvent(PartServiceImpl.java:72) 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:74) at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:59) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:280) at org.eclipse.e4.ui.model.application.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:135) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.hideChild(StackRenderer.java:373) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.removeGui(PartRenderingEngine.java:407) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:97) 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:74) at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:59) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:280) at org.eclipse.e4.ui.model.application.impl.PartImpl.setToBeRendered(PartImpl.java:507) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.hidePart(PartServiceImpl.java:533) at org.eclipse.ui.internal.WorkbenchPage.hidePart(WorkbenchPage.java:769) at org.eclipse.ui.internal.WorkbenchPage.closeEditors(WorkbenchPage.java:719) at org.eclipse.ui.internal.WorkbenchPage.closeAllEditors(WorkbenchPage.java:612) at org.eclipse.ui.internal.CloseAllHandler.execute(CloseAllHandler.java:48)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java