Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION?

sk. picture sk. · Sep 26, 2008 · Viewed 79.5k times · Source

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?

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

Answer

jiriki picture jiriki · Sep 26, 2008

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

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

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).

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