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 104269 - [heapwalker] Fields view cannot work with not initialized fields
Summary: [heapwalker] Fields view cannot work with not initialized fields
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-18 13:41 UTC by ehucka
Modified: 2007-06-05 13:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2007-05-18 13:41:39 UTC
NetBeans IDE Dev (Build 200705161800)
1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
Linux version 2.6.16-1.2122_FC5 running on i386
en_US (nb); UTF-8

I put a breakpoint at the start of initComponents method of some Frame generated
by form. After debugger stopped there I invoked Show Instances from Classes view
for the Frame. Its fields like panels and buttons are null but fields view shows
some values (#1, #2 ...) for them. After I tried to browse the fields content
some of them throw exception, some of them show their static fields. Show
Instances of such field shows some different instance of the same type.

I think there should be 'null' in Value column for the fields and Show Instances
should be disabled for them.

The exception:
com.sun.jdi.ClassNotPreparedException
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:33)
        at com.sun.tools.jdi.ReferenceTypeImpl.fields(ReferenceTypeImpl.java:296)
        at
com.sun.tools.jdi.ReferenceTypeImpl.addAllFields(ReferenceTypeImpl.java:406)
        at com.sun.tools.jdi.ReferenceTypeImpl.allFields(ReferenceTypeImpl.java:420)
        at
org.netbeans.modules.debugger.jpda.models.JPDAClassTypeImpl.staticFields(JPDAClassTypeImpl.java:123)
        at
org.netbeans.modules.debugger.jpda.heapwalk.JavaClassImpl.getStaticFieldValues(JavaClassImpl.java:119)
        at
org.netbeans.modules.debugger.jpda.heapwalk.InstanceImpl.getStaticFieldValues(InstanceImpl.java:144)
        at
org.netbeans.modules.profiler.heapwalk.model.ObjectNode$1.computeChildren(ObjectNode.java:65)
        at
org.netbeans.modules.profiler.heapwalk.model.BrowserUtils$1$1.run(BrowserUtils.java:102)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 1 Martin Entlicher 2007-05-18 14:36:50 UTC
Reproduced.
This is strange, Local Variables shows null correctly, but not the heap walker.
Comment 2 Martin Entlicher 2007-05-24 15:42:16 UTC
The null values were not treated correctly. This is fixed now:

/cvs/debuggerjpda/profiler/heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/InstanceImpl.java,v
 <--  InstanceImpl.java
new revision: 1.5; previous revision: 1.4

/cvs/debuggerjpda/profiler/heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/JavaClassImpl.java,v
 <--  JavaClassImpl.java
new revision: 1.8; previous revision: 1.7
Comment 3 ehucka 2007-06-05 13:46:44 UTC
verified