Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Build Identifier: I20091030-1201 when trying to set a breakpoint in an anonymous inner class, the NPE below is thrown java.lang.NullPointerException at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.getQualifiedName(ToggleBreakpointAdapter.java:444) at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.toggleBreakpoints(ToggleBreakpointAdapter.java:1187) at org.eclipse.debug.ui.actions.ToggleBreakpointAction.run(ToggleBreakpointAction.java:101) at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.run(AbstractRulerActionDelegate.java:103) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.actions.ContributedAction.runWithEvent(ContributedAction.java:185) at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171) at org.eclipse.ui.texteditor.AbstractTextEditor$14.triggerAction(AbstractTextEditor.java:2900) at org.eclipse.ui.texteditor.AbstractTextEditor$14.mouseDoubleClick(AbstractTextEditor.java:2925) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:183) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:367) 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: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) Reproducible: Always Steps to Reproduce: 1.try setting the breakpoint on the return null; line private void test() { fScriptEnvironment.execute(new IScriptRunnable<Void, RuntimeException>() { public Void run(Context cx, Scriptable scope) throws RuntimeException { return null; } }); } fScriptEnvironment defines the execute method: public <V, E extends Exception> V execute(IScriptRunnable<V, E> code) throws E; IScriptRunnable is a simple interface public interface IScriptRunnable<V, E extends Exception> { public V run(Context cx, Scriptable scope) throws E; } 2. 3.
Created attachment 154057 [details] proposed fix it is spec'd that the parser can return an array with corresponding null entries for IJavaElements that could not have their bindings resolved. In this case we have to fall back to composing the name ourselves.
*** Bug 297611 has been marked as a duplicate of this bug. ***
Applied patch to HEAD, please verify Darin W
*** Bug 297888 has been marked as a duplicate of this bug. ***
*** Bug 298927 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) > Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) > Build Identifier: I20091030-1201 > > when trying to set a breakpoint in an anonymous inner class, the NPE below is > thrown > > java.lang.NullPointerException > at > org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.getQualifiedName(ToggleBreakpointAdapter.java:444) > at > org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.toggleBreakpoints(ToggleBreakpointAdapter.java:1187) > at > org.eclipse.debug.ui.actions.ToggleBreakpointAction.run(ToggleBreakpointAction.java:101) > at > org.eclipse.ui.texteditor.AbstractRulerActionDelegate.run(AbstractRulerActionDelegate.java:103) > at > org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289) > at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) > at > org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) > at > org.eclipse.ui.actions.ContributedAction.runWithEvent(ContributedAction.java:185) > at > org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171) > at > org.eclipse.ui.texteditor.AbstractTextEditor$14.triggerAction(AbstractTextEditor.java:2900) > at > org.eclipse.ui.texteditor.AbstractTextEditor$14.mouseDoubleClick(AbstractTextEditor.java:2925) > at > org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:183) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220) > at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) > at > org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) > at > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at > org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) > at > org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) > 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:367) > 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: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) > > > Reproducible: Always > > Steps to Reproduce: > 1.try setting the breakpoint on the return null; line > private void test() { > fScriptEnvironment.execute(new IScriptRunnable<Void, RuntimeException>() { > public Void run(Context cx, Scriptable scope) throws RuntimeException { > return null; > } > }); > } > > fScriptEnvironment defines the execute method: > public <V, E extends Exception> V execute(IScriptRunnable<V, E> code) throws E; > > IScriptRunnable is a simple interface > public interface IScriptRunnable<V, E extends Exception> { > public V run(Context cx, Scriptable scope) throws E; > } > > 2. > 3. This is NOT fixed as of 3.5M6 for MacOX Cocoa 64-bit
*** Bug 301404 has been marked as a duplicate of this bug. ***
reopening to investigate the reported failure on Mac
(In reply to comment #8) > reopening to investigate the reported failure on Mac Apologies but it is fixed in that it now works, i.e. the breakpoint is set. What threw me was that it takes a couple of seconds or so before the breakpoint appears in the margin having click to set a breakpoint. So this does now work but it is very slow which is a bug (IMHO) although lower priority. Not sure whether this should be closed and a separate bug raised or just use this one for the problem? I don't seem to have access to change priority or status so over to you...
>Not sure whether this should be closed and a separate bug raised I suspect you are seeing 301113.