Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION?

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.

like image 672
sk. Avatar asked Sep 26 '08 14:09

sk.


People also ask

What are the reasons of JVM crashes?

A Java application might stop running for several reasons. The most common reason is that the application finished running or was halted normally. Other reasons might be Java application errors, exceptions that cannot be handled, and irrecoverable Java errors like OutOfMemoryError .

What causes EXCEPTION_ ACCESS_ VIOLATION?

Exception access violation comes as a sign of malware infection or that some parts of the software you are trying to launch are accessing protected memory addresses. How do you fix a memory access violation? You may try to check your PC for malware or disable User Account Control.

How do I fix a fatal error in Java Runtime Environment?

Most of the users have fixed the similar issue by uninstall older versions of Java and installing latest version. You may refer to the link to uninstall the older versions of Java. Refer to the link to install the latest version of Java. You may also refer to the link and check.

What is Exception_access_violation 0xC0000005?

EXCEPTION_ACCESS_VIOLATION is typically an error (bug) found at runtime. Developers like Oracle Corporation usually go through several checkpoints before launching a software program like Java Runtime Environment. Although these preventive actions are taken, at times errors like error 0xC0000005 will be missed.


2 Answers

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.

like image 114
jiriki Avatar answered Oct 20 '22 23:10

jiriki


Answer found!

I had the same error and noticed that others who provided the contents of the pid log file were running 64 bit Windows. Just like me. At the end log file, it included the PATH statement. There I could see C:\Windows\SysWOW64 was incorrectly listed ahead of: %SystemRoot%\system32. Once I corrected it, the exception disappeared.

like image 36
user2988439 Avatar answered Oct 20 '22 22:10

user2988439