Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 304847 - [Compatibility] NPE thrown when hiding 'Variables' view
Summary: [Compatibility] NPE thrown when hiding 'Variables' view
Status: CLOSED DUPLICATE of bug 304859
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 304859
Blocks:
  Show dependency tree
 
Reported: 2010-03-05 12:18 EST by Remy Suen CLA
Modified: 2010-03-05 15:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-03-05 12:18:19 EST
The service root has been set to null for reasons that are beyond me at the moment.

org.eclipse.e4.core.services.internal.context.InjectionException: Unexpected error invoking method "preDestroy"
	at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:63)
	at org.eclipse.e4.core.services.internal.context.InjectionClass.processPreDestory(InjectionClass.java:113)
	at org.eclipse.e4.core.services.internal.context.InjectionClass.notify(InjectionClass.java:40)
	at org.eclipse.e4.core.services.internal.context.EclipseContext$TrackableComputationExt.notify(EclipseContext.java:153)
	at org.eclipse.e4.core.services.internal.context.EclipseContext$TrackableComputationExt.doHandleInvalid(EclipseContext.java:135)
	at org.eclipse.e4.core.services.internal.context.Computation.handleInvalid(Computation.java:59)
	at org.eclipse.e4.core.services.internal.context.EclipseContext.dispose(EclipseContext.java:298)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.removeGui(PartRenderingEngine.java:427)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:98)
	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.PartImpl.setToBeRendered(PartImpl.java:507)
	at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.hidePart(PartServiceImpl.java:520)
	at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer$6.close(StackRenderer.java:425)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1570)
	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:1050)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4014)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3605)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$5.run(PartRenderingEngine.java:553)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:475)
	at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:107)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:525)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:511)
	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:195)
	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:611)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
Caused by: java.lang.reflect.InvocationTargetException
	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)
	... 50 more
Caused by: java.lang.NullPointerException
	at org.eclipse.e4.workbench.ui.internal.SelectionServiceImpl.preDestroy(SelectionServiceImpl.java:80)
	... 56 more
Comment 1 Remy Suen CLA 2010-03-05 12:32:16 EST
It seems to me as if the root is set to null _before_ the @PD is called. Now if I invert the listener notification in EclipseContext's dispose() method, then I get an NPE because the event broker is null. :o
Comment 2 Remy Suen CLA 2010-03-05 13:33:57 EST
Upon further investigations, I believe this has been caused by bug 304859.
Comment 3 Remy Suen CLA 2010-03-05 15:47:38 EST

*** This bug has been marked as a duplicate of bug 304859 ***