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.
I have a binary heap dump "heap.bin" taken on JDK 1.5.0_06 on linux. The JDK 6 jhat can read it OK. When I load it into NetBeans 6.0M9 (running on Mac OS X if that matters), i got an exception: 257 java.lang.IllegalArgumentException: Invalid type 8 258 at com.sun.tools.profiler.heap.ClassDumpSegment.getPrimitiveArrayClass(ClassDumpSegment.java:102) 259 at com.sun.tools.profiler.heap.HprofHeap.computeInstances(HprofHeap.java:595) 260 at com.sun.tools.profiler.heap.ClassDump.getInstancesCount(ClassDump.java:183) 261 at com.sun.tools.profiler.heap.ComputedSummary.<init>(ComputedSummary.java:26) 262 at com.sun.tools.profiler.heap.HprofHeap.getSummary(HprofHeap.java:103) 263 at org.netbeans.modules.profiler.heapwalk.HeapWalker.createHeap(HeapWalker.java:159) 264 at org.netbeans.modules.profiler.heapwalk.HeapWalker.<init>(HeapWalker.java:50) 265 at org.netbeans.modules.profiler.heapwalk.ui.OpenHeapWalkerAction$1.run(OpenHeapWalkerAction.java:38) 266 at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539) If I understand this message correctly, and look at the binary heap dump spec, I think 8 is for the byte basic type.
Is is possible to zip your dump and attach it to this issue? BTW: How did you take this dump on JDK5? Did you use jmap?
Yes I used jmap like /usr/java/jdk1.5.0_06/bin/jmap -heap:format=b 17507 The gzipped heap is about 3MB, I will try to upload it.
Created attachment 43809 [details] heap dump for this problem
Thanks.
JDK6 jhat fails to read attached dump with the following exception: Snapshot read, resolving... Resolving 152164 objects... WARNING: Failed to resolve object id 0xb0b60a40 for field unfinalized (signature L) WARNING: Failed to resolve object id 0xb0bd9688 for field cachedMat (signature L) Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to com.sun.tools.hat.internal.model.JavaClass at com.sun.tools.hat.internal.model.JavaObjectArray.resolve(JavaObjectArray.java:68) at com.sun.tools.hat.internal.model.Snapshot.resolve(Snapshot.java:237) at com.sun.tools.hat.Main.main(Main.java:152)
Obsolete milestone, please reevaluate
Changing target milestone to dev, since NetBeans 6.0 is in high resistance mode.
I believe that the heap dump is broken. Note that taking the heap dump with jmap on JDK 5 from a live process is not safe. On JDK 5, jmap attaches to the process image in a non-cooperative manner. There is no guarantee that the heap is in a consistent state. I was not able to open it in jhat and I did the heap dump analysis and it looks like it is missing description for all the classes, which represents arrays. If you find a way to open this heap dump in jhat, please reopen this issue. Thanks.