Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Memory Analyser,but always shows An internal error occurred?

java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid2584.hprof ... Heap dump file created [106948719 bytes in 4.213 secs] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2760) at java.util.Arrays.copyOf(Arrays.java:2734) at java.util.ArrayList.ensureCapacity(ArrayList.java:167) at java.util.ArrayList.add(ArrayList.java:351) at Main.main(Main.java:15) 

But when i open head dump java_pid2584.hprof via Eclipse Memory Analyser,but there is always message:

An internal error occurred during:  "Parsing heap dump from **\java_pid6564.hprof'".Java heap space 
like image 286
Gavin Avatar asked Mar 22 '12 09:03

Gavin


People also ask

How do I run a memory analyzer in Eclipse?

With the Memory Analyzer feature installed, try Window -> Open Perspective -> Other... , then select Memory Analyzer and OK. Once the MA perspecive is open, one should be able to see the Memory Analyzer specific Eclipse menus.


1 Answers

The problem is that Eclipse Memory Analyser does not have enough heap space to open the Heap dump file.

You can solve the problem as follows:

  1. open the MemoryAnalyzer.ini file

  2. change the default -Xmx1024m to a larger size

like image 87
codeisee Avatar answered Sep 22 '22 05:09

codeisee