First, as per issue 740, using 3.2.1, TestBoneRagdoll
works fine for me, but TestRagdollCharacter
results in an EXCEPTION_ACCESS_VIOLATION. However, after upgrading to the 3.3.0-SNAPSHOT version of native Bullet, TestRagdollCharacter
works fine. So, it certainly seems that 740 will be fixed in 3.3.0.
Second, upgrading to 3.3.0-SNAPSHOT doesn’t fix my Sinbad test app. I still get an EXCEPTION_ACCESS_VIOLATION with exactly the same internal exceptions. However, incorporating the setupSinbad
method does fix it, even if I’m still using 3.2.1. So, that’s presumably caused by a different problem.
Third, I’ve managed to reproduce an EXCEPTION_ACCESS_VIOLATION in a similar way to how it happens in my game, but with far less code, as shown below.
private int count;
@Override
public void simpleInitApp() {}
@Override
public void simpleUpdate(float tpf) {
System.out.println(++count);
BulletAppState bulletAppState = new BulletAppState();
bulletAppState.setThreadingType(ThreadingType.PARALLEL);
stateManager.attach(bulletAppState);
}
So, it simply adds another BulletAppState
with parallel threading every frame. For me, I get an EXCEPTION_ACCESS_VIOLATION after precisely 66 BulletAppState
s have been added. Removing the BulletAppState
s makes no difference. The internal exceptions (below) are exactly the same as I was getting with my Sinbad test app before. Whether that means it’s caused by the same problem, or whether it’s just coincidence, I wouldn’t know.
Event: 0.411 Thread 0x0000000002708000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x00000000e04ef408) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]
Event: 0.414 Thread 0x0000000002708000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x00000000e04fc758) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]
Event: 0.533 Thread 0x0000000059cd9000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e0676fa8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 0.677 Thread 0x0000000059cd9000 Exception <a 'java/lang/NoClassDefFoundError'> (0x00000000e0716d18) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1394]
Event: 3.114 Thread 0x0000000059fc4000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000e178d1c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 3.114 Thread 0x0000000059fc4000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000e178ed30) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 3.114 Thread 0x0000000059fc4000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000e178fe50) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 3.115 Thread 0x0000000059fc4000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000e1794f70) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 3.115 Thread 0x0000000059fc4000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000e1795bc8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 3.115 Thread 0x0000000059fc4000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000e17967f0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u161\10277\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Although my game gets different internal exceptions, if whatever is causing the simple test app above to crash could be fixed, it might also fix the issue with my game, because the behaviour is similar. It’s certainly the nearest I’ve been able to get to reproducing the problem with a standalone app.
I’d be interested to know if anyone else gets the same behaviour running the above app. In case it makes a difference, I’m using 64-bit Windows.