Community
Participate
Working Groups
Build Identifier: 20110615-0604 org.eclipse.wst.jsdt.debug.internal.rhino.debugger.ScriptSource#clearBreakpoints throws and NPE exception when it gets the breakpoint from the lines[0].breakpoint for (int i = 0; i < this.lines.length; i++) { Breakpoint bp = lines[i].breakpoint; => NPE Exception!!! The constructor fill the array from lines[1] to lines[lineNumbers+1]. Reproducible: Always Steps to Reproduce: 1.Start debugging a JS Script. It triggers the RhinoDebuggerImpl.handleCompilationDone() and it puts the script into the "uriToScript" 2.Update the script so it triggers again the call of RhinoDebuggerImpl.handleCompilationDone() and it finds the "ScriptSource old = (ScriptSource) uriToScript.remove(uri);" old script. 3.The old.clearBreakpoints(this); in line 156 throws NPE
Thanks for the bug and the assessment of the problem! We should be checking the line data for existence like we do pretty much everywhere else in ScriptSource. Applied check to HEAD.