Login  Register

Re: NullPointerException from native method

Posted by Sven Gothel on Apr 12, 2023; 9:29pm
URL: https://forum.jogamp.org/NullPointerException-from-native-method-tp4042433p4042442.html

bananafish wrote
Intel driver's limit was 3GB so it just slid by. Replacing constant with global const * fixed it. What still doesn't make sense is why this manifests as a NullPointerException. I do not see any code in JOCL's native source that would throw a NullPointerException for that function.
correct, same conclusion.

bananafish wrote
Could the JVM be catching an uncaught C++ exception from the native call and converting it to a java exception? OCLGrind itself is written in C++. I haven't yet found anything about Temurin 11 doing automatic exception conversion.
Same thing here, weird.

We don't use nor catch C++ stuff here.
Only in Direct-BT I used a C++ -> Java mapping with mapping C++ exceptions to Java.
But our GlueGen compiler for all JogAmp uses plain old C for same API.