0

I have already added -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="C:\hd.hprof" to Default VM arguments but I don't know why the heap dump file not generated when OutOfMemoryError thrown. Can anyone halp me?

More details:

  • My JRE version is 1.7.0_02

  • The heap dump is generated once for the first time but when I change HeapDumpPath, it not generated anymore. Already revert HeapDumpPath to be the same as the first time but heap dump still not generated

  • File C:\hd.hprof already exists.

  • Below image is the eclipse dialog when I force close eclipse. In that dialog, I can see that eclipse have included my arguments ]![Below image is the eclipse dialog when I force closing eclipse. In that dialog, I can see that eclipse have included my arguments

enter image description here

Thanks you.

Wayne
  • 6,361
  • 10
  • 46
  • 69
  • This seems to be an issue with permissions, you could try another path like C:\TEMP. But don't ask where the c:\hd.prof comes from ;-) – stacker Jun 12 '12 at 10:46
  • I don't think so because I have already tried many different paths but the result is still the same. – Wayne Jun 12 '12 at 14:53
  • Because the application I want to get heap dump when OutOfMem Exeption thrown is an Android application. – Wayne Jun 12 '12 at 15:07

1 Answers1

1

Some thrown heap overflows are not real overflows, but are thrown directly after calculation.In fact, there is no overflow, so no heap dump will be generated.For example, when using DirectByteBuffer