Heap Dump, With OverFlow

Problem: A Heap Stack Overflow caused by something unknown in the code.

Solution: Dump the stack when it crashes and then analyze using a Memory Analyzer.

Step 1: Dump Stack with crash: Add "-XX:+HeapDumpOnOutOfMemoryError" this to the VM arguments in the Run Configuration.

(Note: the size of the stack can be adjusted with this "-Xmx300m" argument. Lowering the heap size to reduce the dump size can speed up analysis but may remove the actual cause of the problem.)

Step 2: Run program get dump in the projects' directory (you will have to refresh to see it in Eclipse).

Step 3: Install Analyzer plugin site http://www.eclipse.org/mat/

Step 4: Double click heap dump, should analyze and present information.

0 comments:

Newer Post Older Post Home