Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361424

Summary: [Compatibility] New icons after build produce NPE when activated
Product: [Eclipse Project] Platform Reporter: DJ Houghton <dj.houghton>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug
Attachments:
Description Flags
Screen shot of new icons
none
Line between icons. none

Description DJ Houghton CLA 2011-10-19 11:53:11 EDT
Created attachment 205544 [details]
Screen shot of new icons

eclipse.buildId=I20111018-2000

I updated to this build and some new icons appears in my toolbar. I didn't know what they were and they didn't have any hover-help so I clicked on them. An NPE resulted.


org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:228)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:209)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:123)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:161)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:717)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:622)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:606)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$3.handleEvent(HandledContributionItem.java:565)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4129)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3975)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3614)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:972)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:888)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:90)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:565)
	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:123)
	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:352)
	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:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)
Caused by: java.lang.NullPointerException
	at org.eclipse.debug.internal.ui.contexts.DebugContextManager.createService(DebugContextManager.java:136)
	at org.eclipse.debug.internal.ui.contexts.DebugContextManager.getContextService(DebugContextManager.java:195)
	at org.eclipse.debug.ui.actions.DebugCommandAction.getDebugContextService(DebugCommandAction.java:291)
	at org.eclipse.debug.ui.actions.DebugCommandAction.getContext(DebugCommandAction.java:236)
	at org.eclipse.debug.ui.actions.DebugCommandAction.run(DebugCommandAction.java:253)
	at org.eclipse.debug.internal.ui.commands.actions.DebugCommandActionDelegate.run(DebugCommandActionDelegate.java:70)
	at org.eclipse.debug.internal.ui.commands.actions.DebugCommandActionDelegate.runWithEvent(DebugCommandActionDelegate.java:79)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:285)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 37 more
Comment 1 Remy Suen CLA 2011-10-19 13:56:17 EDT
I don't have problems hitting the 'Terminate' item but do get an error like DJ's if I hit 'Suspend'. I get this NPE first before the error in comment 0 though.

java.lang.NullPointerException: A handle object may not have a null identifier
	at org.eclipse.core.commands.common.HandleObjectManager.checkId(HandleObjectManager.java:55)
	at org.eclipse.core.commands.CommandManager.getCommand(CommandManager.java:544)
	at org.eclipse.ui.internal.commands.CommandService.getCommand(CommandService.java:146)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.setActionDefinitionId(CommandLegacyActionWrapper.java:356)
	at org.eclipse.debug.internal.ui.commands.actions.DebugCommandActionDelegate.init(DebugCommandActionDelegate.java:54)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy$2.run(ActionDelegateHandlerProxy.java:459)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.initDelegate(ActionDelegateHandlerProxy.java:478)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.loadDelegate(ActionDelegateHandlerProxy.java:596)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:265)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:228)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:209)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:123)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:161)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:717)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:622)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:606)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$3.handleEvent(HandledContributionItem.java:565)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
Comment 2 Remy Suen CLA 2011-10-19 14:23:32 EDT
The 'Suspend' action doesn't have this problem because its action actually defines a proper action definition id in its constructor, see TerminateCommandAction.
Comment 3 Remy Suen CLA 2011-10-19 14:49:23 EDT
(In reply to comment #2)
> The 'Suspend' action doesn't have this problem because its action actually
> defines a proper action definition id in its constructor, see
> TerminateCommandAction.

If Debug sets action definition ids for all its actions then these NPEs would theoretically just all disappear. See bug 361448.
Comment 4 Pawel Piech CLA 2011-10-19 16:54:31 EDT
Created attachment 205567 [details]
Line between icons.

(In reply to comment #3)
> If Debug sets action definition ids for all its actions then these NPEs would
> theoretically just all disappear. See bug 361448.

With the fix to bug 361448, I don't see the NPE anymore, but the behavior is still somewhat different than in 3.x: 
1) The actions are enabled until I select them once.
2) There's a strange while line between the step icons (see screenshot).
3) I don't get tooltips on any toolbar items.
Comment 5 Remy Suen CLA 2011-10-19 17:31:42 EDT
(In reply to comment #4)
> 3) I don't get tooltips on any toolbar items.

That may be fixed by bug 361415.
Comment 6 Remy Suen CLA 2011-10-20 07:56:44 EDT
(In reply to comment #4)
> 3) I don't get tooltips on any toolbar items.

If you're on Linux you may also be hitting bug 354126.
Comment 7 Remy Suen CLA 2011-10-20 11:33:52 EDT
(In reply to comment #4)
> 1) The actions are enabled until I select them once.

Opened bug 361561 for this.

> 2) There's a strange while line between the step icons (see screenshot).

And opened bug 361562 for this other one.

Will leave this original bug open as I'm not sure if we need to be wiring our actions in a different way to tolerate the originally null action definition ids or if the programming model that Debug is using is an unsupported path.
Comment 8 Lars Vogel CLA 2019-11-14 03:10:30 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.