We have a piece of JNI code that lets us link to a legacy C library. The Java app references the C dll/so to call the c methods which create a new Java object with loads of Integers, Longs and Strings and then passes back this object to the Java code. The Java code tries to print these values that it received back from C and randomly crashes at different points in the code. When we run this in Linux it runs with no problems but in Windows it intermittently crashes with:
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77e11ed7, pid=893220,
tid=887676
#
# JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05- b13)
# Java VM: Java HotSpot(TM) Client VM (25.5-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [msvcr100.dll+0x1ed7]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
I would try to blame it on the god mode shortcut -> Fatal error crashing on latest version of Java on Windows 10 machine
But it only happens with some bits of code and not the others... so it's definitely some thing up how the jni bit was done C side.