Community
Participate
Working Groups
No step to reproduce, found it in the log. java.lang.NullPointerException at org.eclipse.debug.ui.actions.AddMemoryRenderingActionDelegate.updateAction(Unknown Source) at org.eclipse.debug.ui.actions.AddMemoryRenderingActionDelegate.access$5(Unknown Source) at org.eclipse.debug.ui.actions.AddMemoryRenderingActionDelegate$DebugContextListener.contextActivated(Unknown Source) at org.eclipse.debug.ui.actions.AddMemoryRenderingActionDelegate$DebugContextListener.debugContextChanged(Unknown Source) at org.eclipse.debug.internal.ui.contexts.DebugWindowContextService$1.run(Unknown Source) at org.eclipse.core.runtime.SafeRunner.run(Unknown Source) at org.eclipse.debug.internal.ui.contexts.DebugWindowContextService.notify(Unknown Source) at org.eclipse.debug.internal.ui.contexts.DebugWindowContextService.notify(Unknown Source) at org.eclipse.debug.internal.ui.contexts.DebugWindowContextService.debugContextChanged(Unknown Source) at org.eclipse.debug.ui.contexts.AbstractDebugContextProvider$1.run(Unknown Source) at org.eclipse.core.runtime.SafeRunner.run(Unknown Source) at org.eclipse.debug.ui.contexts.AbstractDebugContextProvider.fire(Unknown Source) at org.eclipse.debug.internal.ui.views.launch.LaunchView$ContextProvider.activate(Unknown Source) at org.eclipse.debug.internal.ui.views.launch.LaunchView.selectionChanged(Unknown Source) at org.eclipse.jface.viewers.Viewer$2.run(Unknown Source) at org.eclipse.core.runtime.SafeRunner.run(Unknown Source) at org.eclipse.core.runtime.Platform.run(Unknown Source) at org.eclipse.ui.internal.JFaceUtil$1.run(Unknown Source) at org.eclipse.jface.util.SafeRunnable.run(Unknown Source) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(Unknown Source) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(Unknown Source) at org.eclipse.jface.util.OpenStrategy.access$3(Unknown Source) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source) at org.eclipse.ui.internal.Workbench.runUI(Unknown Source) at org.eclipse.ui.internal.Workbench.access$4(Unknown Source) at org.eclipse.ui.internal.Workbench$5.run(Unknown Source) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source) at org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source) at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source) at org.eclipse.equinox.launcher.Main.run(Unknown Source) at org.eclipse.equinox.launcher.Main.main(Unknown Source)
Justin, please investigate.
Changing milestone to 3.6. Justin or Sam can update as appropriate.
Created attachment 155119 [details] Patch #1 Was unable to reproduce the NPE, but found the possible cause for this error. In updateAction, there's a possibility that action is null. If it is, this could cause the NPE to occur. Most of the calls to updateAction are preceded by a call to bindAction, which does a check to see if the action is null. Thus, instead of having the check in bindAction, I decided to check if the action is null before bindAction and updateAction are called.
Thank you for patches. I will review.
Justin, what are the case where the action can be null? Why do we not want to check for null in update actions, but rather guard the calls with a null check? Wouldn't it be simpler if we simply add the null check in updateAction? bindAction have a null check and should be safe.
Created attachment 155773 [details] another approach
The changes I proposed are a bit more complex, but I chose to do it this way as opposed to adding the null check in updateAction, as bindAction already does a null check. Thus, I thought it would be redundant if we could enter both methods, knowing fully beforehand that we would return from them immediately as the action is null. And since bindAction and updateAction are both called hand-in-hand, I decided to remove the check from bindAction and just have it checked before we enter either method.
applied Justin's patch
verified