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

Bug 332792

Summary: [Crossfire] NPE setting breakpoint
Product: [WebTools] JSDT Reporter: Grant Gayed <grant_gayed>
Component: DebugAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact: Michael Rennie <Michael_Rennie>
Severity: normal    
Priority: P3 CC: Michael_Rennie, thatnitind
Version: unspecified   
Target Milestone: 3.3 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
test .html file none

Description Grant Gayed CLA 2010-12-16 15:39:18 EST
- save the attached file to your local file system
- connect via Crossfire to a running Firefox or IE
- navigate it to the downloaded spider.html file
- in the Debug view show the scripts
- select the script "http://www.gmodules.com/gadgets/ifr?url=...output=js" (for me this is always the last script listed), right-click -> Open Source
- when its source is shown set a breakpoint on its second line and you'll get the following NPE:

java.lang.NullPointerException
    at org.eclipse.wst.jsdt.debug.internal.crossfire.jsdi.CFVirtualMachine.breakpointAdded(CFVirtualMachine.java:533)
    at org.eclipse.debug.internal.core.BreakpointManager$BreakpointNotifier.run(BreakpointManager.java:920)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.debug.internal.core.BreakpointManager$BreakpointNotifier.notify(BreakpointManager.java:946)
    at org.eclipse.debug.internal.core.BreakpointManager.fireUpdate(BreakpointManager.java:860)
    at org.eclipse.debug.internal.core.BreakpointManager.addBreakpoints(BreakpointManager.java:579)
    at org.eclipse.debug.internal.core.BreakpointManager.addBreakpoints(BreakpointManager.java:549)
    at org.eclipse.debug.internal.core.BreakpointManager.addBreakpoint(BreakpointManager.java:542)
    at org.eclipse.wst.jsdt.debug.internal.core.breakpoints.JavaScriptBreakpoint.register(JavaScriptBreakpoint.java:108)
    at org.eclipse.wst.jsdt.debug.internal.core.breakpoints.JavaScriptLineBreakpoint$1.run(JavaScriptLineBreakpoint.java:84)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
    at org.eclipse.debug.core.model.Breakpoint.run(Breakpoint.java:335)
    at org.eclipse.wst.jsdt.debug.internal.core.breakpoints.JavaScriptLineBreakpoint.<init>(JavaScriptLineBreakpoint.java:87)
    at org.eclipse.wst.jsdt.debug.core.model.JavaScriptDebugModel.createLineBreakpoint(JavaScriptDebugModel.java:53)
    at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.ToggleBreakpointAdapter$1.run(ToggleBreakpointAdapter.java:121)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Grant Gayed CLA 2010-12-16 15:40:02 EST
Created attachment 185367 [details]
test .html file
Comment 2 Michael Rennie CLA 2011-02-25 12:28:46 EST
*** Bug 337361 has been marked as a duplicate of this bug. ***
Comment 3 Grant Gayed CLA 2011-02-25 14:01:06 EST
I notice that this NPE no longer happens when the patch attached to bug 336999 is applied.
Comment 4 Michael Rennie CLA 2011-02-25 15:48:50 EST
(In reply to comment #3)
> I notice that this NPE no longer happens when the patch attached to bug 336999
> is applied.

This also got fixed with the commit from bug 328531.