Community
Participate
Working Groups
An internal error occurred during parsing of heap dump: java.lang.NullPointerException at org.eclipse.mat.hprof.HprofParserHandlerImpl.beforePass2(HprofParserHandlerImpl.java:123) at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:72) at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:203) at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:114) at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:143) at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:123) at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDumpJob.java:56) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Use the attached heap dump to find an error. eclipse.buildId=unknown java.version=1.6.0_21 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=cs_CZ Command-line arguments: -os win32 -ws win32 -arch x86 Eclipse Memory Analyzer Version 1.0.1
It looks like no class called java.lang.Class has been found in the dump. Is the dump corrupted?
Does the jhat tool supplied with Oracle/Sun SDKs read the dump successfully? Was the heap dump transferred using ftp? Is it possible it was transferred in ASCII not binary?
I reduced the severity of this bug. We haven't heard anything new and haven't been able to reproduce.
I got the exact same error. hprof is in binary format correct, and I opened the hprof file with jhat with the following message: C:\Program Files\Java\jdk1.6.0_06\bin>jhat z:\temp\java_pid7036.hprof Reading from z:\temp\java_pid7036.hprof... Dump file created Fri Jul 08 12:06:53 EDT 2011 Snapshot read, resolving... Resolving 0 objects... WARNING: hprof file does not include java.lang.Class! WARNING: hprof file does not include java.lang.String! WARNING: hprof file does not include java.lang.ClassLoader! Chasing references, expect 0 dots Eliminating duplicate references Snapshot resolved. Started HTTP server on port 7000 When I click the "Show finalizer summary" link in jhat, I got the following error. thanks. Exception in thread "Thread-53" java.lang.NullPointerException at com.sun.tools.hat.internal.model.Snapshot.getFinalizerObjects(Snapshot.java:393) at com.sun.tools.hat.internal.server.FinalizerSummaryQuery.run(FinalizerSummaryQuery.java:26) at com.sun.tools.hat.internal.server.HttpReader.run(HttpReader.java:181) at java.lang.Thread.run(Thread.java:619)
I have observed this with heap dumps taken from JDK 1.5.0_11+ JDKs on Red Hat. Jmap was used to generate the heap dump. However, histogram listing from jmap does show java.lang.Class: Size Count Class description ------------------------------------------------------- 117016288 1112362 char[] 54692528 502140 java.lang.Object[] 52775520 365553 * ConstMethodKlass ... 9778688 152792 java.util.HashMap 9408320 58802 org.apache.jetspeed.om.folder.proxy.FolderProxy 8638920 56835 java.lang.reflect.Method 8135808 84748 org.apache.jetspeed.om.page.proxy.PageProxy 6608736 11798 * MethodDataKlass 5615280 31905 java.lang.Class
Failure is at: ClassImpl javaLangClass = javaLangClasses.get(0); Perhaps we could need to create dummy classes for java.lang.Class and java.lang.Classloader if they do not exist due to a corrupt dump. The DTFJ parser does something similar.
Created attachment 259486 [details] Dump that generates a NullPointerException while parsing I do have this same issue while reading the attached dump. The error log contains: !SESSION 2016-02-02 12:47:15.943 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_66 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86_64 !ENTRY org.eclipse.mat.ui 1 0 2016-02-02 12:47:53.775 !MESSAGE Detected compressed references, because with uncompressed 64-bit references the array at 0xfab008c8 would overlap the array at 0xfab00378 !ENTRY org.eclipse.mat.ui 1 0 2016-02-02 12:47:53.969 !MESSAGE Heap C:\temp\mon.bin contains 123,987 objects !ENTRY org.eclipse.core.jobs 4 2 2016-02-02 12:47:54.063 !MESSAGE An internal error occurred during: "Parsing heap dump from 'C:\temp\mon.bin'". !STACK 0 java.lang.NullPointerException at org.eclipse.mat.hprof.HprofParserHandlerImpl.resolveClassHierarchy(HprofParserHandlerImpl.java:587) at org.eclipse.mat.hprof.Pass2Parser.readInstanceDump(Pass2Parser.java:205) at org.eclipse.mat.hprof.Pass2Parser.readDumpSegments(Pass2Parser.java:159) at org.eclipse.mat.hprof.Pass2Parser.read(Pass2Parser.java:89) at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:94) at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:222) at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:126) at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:145) at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDumpJob.java:83) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) And indeed with jhat I can navigate the heap dump
I am also facing the same issue. Can you please let me know how to add the patch provided in eclipse.
The fix for bug 471757 allows me to open the dump attached to this bug. *** This bug has been marked as a duplicate of bug 471757 ***