Eclipse Memory Analyzer – Java heap space Error when Opening an hprof

Hello Everyone,

Interesting thing today; so in my adventures in running a diagnostic for why Java crashed; I got… a Java Crash on my computer when trying to open the crash dump!  Okay not really but still interesting.

To analyze a hprof crash for why Java crashes; you can use a tool such as the Eclipse Memory Analyzer.  This Open Source Project is a great tool and item to start with for analyzing crash dumps


Unfortunately after getting the program and opening the crash file which I was hoping to analyze my computer encountered the error:


'Parsing heap dump from 'C:\Users\stenbm2\Downloads\java_pid17404.hprof" has encountered a problem.

An internal error occurred during: "Parsing heap dump from 'C:\Users\stenbm2\Downloads\java_pid17404.hprof'".

This most certainly cannot be!  But we can always find more errors; so let’s “follow the logs”!


And we then find the errors:


eclipse.buildId=unknowneclipse.buildId=unknownjava.version=1.8.0_121java.vendor=Oracle CorporationBootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_USCommand-line arguments:  -os win32 -ws win32 -arch x86_64
org.eclipse.core.jobsErrorTue Oct 17 09:28:00 EDT 2017An internal error occurred during: "Parsing heap dump from 'C:\Users\stenbm2\Downloads\java_pid17404.hprof'".
java.lang.OutOfMemoryError: Java heap space at org.eclipse.mat.parser.index.IndexWriter.copyOf( at org.eclipse.mat.parser.index.IndexWriter$Identifier.add( at org.eclipse.mat.hprof.HprofParserHandlerImpl.reportInstance( at org.eclipse.mat.hprof.Pass1Parser.readInstanceDump( at org.eclipse.mat.hprof.Pass1Parser.readDumpSegments( at at org.eclipse.mat.hprof.HprofIndexBuilder.fill( at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse( at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot( at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot( at at


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

Tue Oct 17 09:27:44 EDT 2017
Detected compressed references, because with uncompressed 64-bit references the array at 0x7801192b8 would overlap the array at 0x780117210


And from the first error the primary code: java.lang.OutOfMemoryError: Java heap space

Egads!  So thus the program to analyze Java Heap Crashes; crashed due to a Java Heap Space Error.

Well for Java Heap Space errors this can be corrected by checking the configuration for the impacted program/system.  In this case, your installation folder should have the MemoryAnalyzer.ini file for the Java configuration.


From there; I was able to find the below information:



So to start; we can find the above has the xmx configuration (one of the more popular configuration references for Java); which is for the MaxHeapSize for Java.  In this case the -Xmx1024m indicates that the system allocates approximately 1 GB of Memory for the Maximum Heap Size.  Additionally:


-> This is for the Initial Heap Size.  This would be initial value used and in general case is the amount that will usually grow from this size.


-> This is for the Maximum Heap Size that is allowed.  If insufficient; Java can crash with the OutOfMemoryError we saw earlier.

While this is a tricky topic; it isn’t advisable to just increase the Java Heap Value on systems such as production without understanding the cause.  In this case, it’s on my personal laptop and the HPROF file I was trying to reach was approximately 3.9 GB so I increased the value to 2 GB in the ini file and then relaunched (from 1024 to 2048m).  However, your results may vary -> as my laptop had 8 GB of RAM.

To Do List -> More advanced topics on Java and memory allocation as this can be explained in greater detail to help confirm troubleshooting/reviews for possible/probable causes of crashes/unstable memory handling and what can be done to correct the crash.


Author: yetanothercharacter

Technical Support Nerd (it's the glasses)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s