本文介绍了Java VM EXCEPTION_ACCESS_VIOLATION 的可能原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当 Java VM 因 EXCEPTION_ACCESS_VIOLATION 崩溃并生成 hs_err_pidXXX.log 文件时,这表示什么?错误本身基本上是一个空指针异常.它总是由 JVM 中的错误引起,还是有其他原因,例如硬件故障或软件冲突?

When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always caused by a bug in the JVM, or are there other causes like malfunctioning hardware or software conflicts?

有一个原生组件,这是一个在 win32 上的 SWT 应用程序.

there is a native component, this is an SWT application on win32.

推荐答案

大多数时候这是 VM 中的错误.但它可能由任何本机代码(例如 JNI 调用)引起.

Most of the times this is a bug in the VM.But it can be caused by any native code (e.g. JNI calls).

hs_err_pidXXX.log 文件应包含有关问题发生位置的一些信息.

The hs_err_pidXXX.log file should contain some information about where the problem happened.

您还可以检查文件中的堆"部分.许多 VM 错误是由垃圾收集引起的(尤其是在较旧的 VM 中).此部分应显示崩溃时垃圾是否正在运行.此部分还显示,是否填充了堆的某些部分(百分比数字).

You can also check the "Heap" section inside the file. Many of the VM bugs are caused by the garbage collection (expecially in older VMs). This section should show you if the garbage was running at the time of the crash. Also this section shows, if some sections of the heap are filled (the percentage numbers).

在内存不足的情况下,VM 也更有可能崩溃.

The VM is also much more likely to crash in a low memory situation than otherwise.

这篇关于Java VM EXCEPTION_ACCESS_VIOLATION 的可能原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 00:01