Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 104269 - [heapwalker] Fields view cannot work with not initialized fields
[heapwalker] Fields view cannot work with not initialized fields
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Code
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Martin Entlicher
issues@debugger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-18 13:41 UTC by ehucka
Modified: 2007-06-05 13:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo