This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 167781

Summary: NullPointerException at org.netbeans.modules.debugger.jpda.jdi.ObjectReferenceWrapper.isCollected
Product: debugger Reporter: Vojtech Sigler <vsigler>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=153085
Issue Type: DEFECT Exception Reporter: 153085
Attachments: stacktrace

Description Vojtech Sigler 2009-06-29 10:10:57 UTC
Build: NetBeans IDE Dev (Build 200906290201)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Linux, 2.6.28-13-generic, i386

User Comments:
vsigler: Started debugging a jsp file on a Tomcat 6.0 server.



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.jdi.ObjectReferenceWrapper.isCollected(ObjectReferenceWrapper.java:254)
        at org.netbeans.modules.debugger.jpda.breakpoints.ClassBasedBreakpoint.checkLoadedClasses(ClassBasedBreakpoint.java:284)
        at org.netbeans.modules.debugger.jpda.breakpoints.LineBreakpointImpl.setRequests(LineBreakpointImpl.java:217)
        at org.netbeans.modules.debugger.jpda.breakpoints.BreakpointImpl.update(BreakpointImpl.java:149)
        at org.netbeans.modules.debugger.jpda.breakpoints.BreakpointImpl.set(BreakpointImpl.java:127)
        at org.netbeans.modules.debugger.jpda.breakpoints.LineBreakpointImpl.<init>(LineBreakpointImpl.java:127)
Comment 1 Vojtech Sigler 2009-06-29 10:11:07 UTC
Created attachment 84116 [details]
stacktrace
Comment 2 Vojtech Sigler 2009-06-29 10:32:20 UTC
Also tested with a clean userdir.

My original testcase was:
1) Create a new web project using tomcat 6.0
2) add a simple scriptlet (out.println("..."))
3) add a line breakpoint in the scriptlet
4) debug project

I've also tested and reproduced this using Glassfish V3 Prelude with the same results. When there's no breakpoint set,
the debugging session starts correctly. The exception fired when I toggle a line breakpoint. The breakpoint is displayed
in the IDE, but it is not hit.

Also tried with multiple projects. Making this a P1, because it makes jsp debugging useless and I haven't found any
workaround.
Comment 3 Vojtech Sigler 2009-06-29 10:51:38 UTC
This is not limited to jsp only. I just experienced the same when trying to debug a simple j2se project.
Comment 4 Martin Entlicher 2009-06-29 11:08:29 UTC
It's fixed in changeset:   136386:e98d527547a4
http://hg.netbeans.org/main/rev/e98d527547a4
Comment 5 Quality Engineering 2009-06-29 17:43:31 UTC
Integrated into 'main-golden', will be available in build *200906291400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e98d527547a4
User: mentlicher@netbeans.org
Log: #167781 - Prevent from NPE.
Comment 6 Vojtech Sigler 2009-06-30 09:07:43 UTC
Verified in trunk build (200906300200).