Possible Causes of Java Vm Exception_Access_Violation

Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION?

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.

JVM Crash - EXCEPTION_ACCESS_VIOLATION

The crash happens inside DirectX library: d3d9.dll. Try the following options:

  • Update / reinstall graphics driver.
  • Switch off graphics card utilities (I've noticed RivaTuner in the list of loaded libraries).
  • Run Java with -Dsun.java2d.d3d=false JVM option or set J2D_D3D=false environment variable. This would definitely help, though Java will not make use of Direct3D acceleration.

JVM EXCEPTION_ACCESS_VIOLATION crash in Spring Boot application

In the crash log I noticed -Xverify:none among JVM options. Turning off bytecode verification makes JVM vulnerable to invalid bytecode. With the verification disabled, JVM can behave unpredictably, including crashes like in this case.

The crash log has also a sign of bytecode instrumentation library javassist. In theory, the invalid bytecode instrumentation along with the disabled verification can be a reason of JVM crashes.

EXCEPTION_ACCESS_VIOLATION Tomcat 9 outside JVM

The most likely explanation (outside of a bug in sqlite) is that the JVM is running the webserver with a lot of threads but the sqlite configuration is using single threaded mode and thus causing memory corruption.

Check that you are starting/configuring the sqlite with at least multi threaded mode.

https://sqlite.org/threadsafe.html

EXCEPTION_ACCESS_VIOLATION in Jacob dll using VM in Jenkins pipeline

Possible Solution

Try changing your java version build to 1.8.0_141.

Note that 141 is important here. Different version build numbers may not be compatible and throw similar errors.

You can find old java versions in the Java Archive, and search for Java SE Development Kit 8u141

Context

Our team found the exact same problem by calling jacob dll via java code.
In our case the error inside the "hs_pid_xxxx" file was the exact same as above:

  • Variant_getVariantType+0x51
  • Memory address 180012df1
  • EXCEPTION_ACCESS_VIOLATION

The whole team searched the web for some months while exchanging java versions, jacob versions, AutoitX versions, even windows versions considering different builds for windows server/windows home.

During our attempts we realized that the code was only specifically running on our local company machines, it was not possible to run this specific jacob call within any of our VMs or even our personal computers. After some time we decided to try to use the SPECIFIC JAVA BUILD wich was installed in our company local setups. By specific build I mean not only using the same java version ( Java 8/ Java 11/ Java 15 ) but also using the same java build like in Java SE Development Kit 8u141
in this link we downloaded the file that stated 141 and the exception was gone
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
Aparently the jvm was raising a nullpointer to the jacob dll in the newer java versions

In any case... if anyone is experiencing that issue, I believe it is worth the try



Related Topics



Leave a reply



Submit