Project: Eclipse_Platform_UI
Bug 304739 [Compatibility] NPEs thrown opening a second workbench window
Reported: 2010-03-04 15:24:23 | Status: resolved fixed

2010-03-04 15:18:36.046 Log ErrorException while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/application/ElementContainer/selectedElement/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@72527252 java.lang.NullPointerException at org.eclipse.ui.part.PageBookView$4.partVisible(PageBookView.java:1038) at org.eclipse.ui.internal.WorkbenchPage.firePartVisible(WorkbenchPage.java:2411) at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage.java:2404) at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partVisible(WorkbenchPage.java:132) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.firePartVisible(PartServiceImpl.java:205) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.access$1(PartServiceImpl.java:203) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl$1.handleEvent(PartServiceImpl.java:93) 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:280) at org.eclipse.e4.ui.model.application.impl.PartStackImpl.setSelectedElement(PartStackImpl.java:138) at org.eclipse.e4.ui.model.application.impl.PartStackImpl.setSelectedElement(PartStackImpl.java:1) at org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:102) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:349) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:395) at org.eclipse.e4.workbench.ui.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:56) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:345) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:395) at org.eclipse.e4.workbench.ui.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:56) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:345) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:395) at org.eclipse.e4.workbench.ui.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:99) at org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:65) 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:280) at org.eclipse.e4.ui.model.application.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:138) at org.eclipse.e4.ui.model.application.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1) at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:1878) at org.eclipse.ui.internal.WorkbenchWindow.initializeDefaultServices(WorkbenchWindow.java:1579) at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:352) 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.e4.core.services.internal.context.InjectionMethod.callMethod(InjectionMethod.java:96) at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:60) at org.eclipse.e4.core.services.internal.context.InjectionClass.processPostConstruct(InjectionClass.java:67) at org.eclipse.e4.core.services.internal.context.InjectionClass.notify(InjectionClass.java:44) at org.eclipse.e4.core.services.internal.context.EclipseContext$TrackableComputationExt.notify(EclipseContext.java:153) at org.eclipse.e4.core.services.internal.context.EclipseContext.runAndTrack(EclipseContext.java:423) at org.eclipse.e4.core.services.internal.context.ObjectProviderContext.runAndTrack(ObjectProviderContext.java:91) at org.eclipse.e4.core.services.internal.context.ContextInjector.inject(ContextInjector.java:58) at org.eclipse.e4.core.services.injector.Injector.inject(Injector.java:31) at org.eclipse.e4.core.services.internal.context.ObjectProviderContext.init(ObjectProviderContext.java:87) at org.eclipse.e4.core.services.context.spi.ContextInjectionFactory.inject(ContextInjectionFactory.java:94) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1088) at org.eclipse.ui.internal.Workbench.openWorkbenchWindow(Workbench.java:2009) at org.eclipse.ui.internal.Workbench.openWorkbenchWindow(Workbench.java:2004) at org.eclipse.ui.internal.handlers.OpenInNewWindowHandler.execute(OpenInNewWindowHandler.java:58)

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/PartServiceImpl.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java