简体   繁体   English

未生成堆转储

[英]Heap dump not generated

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.我已经将-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="C:\\hd.hprof"到默认 VM 参数中,但我不知道为什么OutOfMemoryError时未生-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="C:\\hd.hprof"转储文件。 Can anyone halp me?有人可以阻止我吗?

More details:更多细节:

  • My JRE version is 1.7.0_02我的 JRE 版本是 1.7.0_02

  • The heap dump is generated once for the first time but when I change HeapDumpPath, it not generated anymore.堆转储第一次生成一次,但是当我更改 HeapDumpPath 时,它不再生成。 Already revert HeapDumpPath to be the same as the first time but heap dump still not generated已将 HeapDumpPath 恢复为与第一次相同但仍未生成堆转储

  • File C:\\hd.hprof already exists.文件C:\\hd.hprof已经存在。

  • 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.在那个对话框中,我可以看到 eclipse 包含了我的参数 ]![下图是我强制关闭 eclipse 时的 eclipse 对话框。 In that dialog, I can see that eclipse have included my arguments在那个对话框中,我可以看到 eclipse 已经包含了我的论点

在此处输入图片说明

Thanks you.谢谢。

一些抛出的堆溢出并不是真正的溢出,而是计算后直接抛出。实际上并没有溢出,所以不会产生堆转储。例如使用DirectByteBuffer时

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM