Sometimes, Java callback from CPP invocation (override a native method with a non-native method in a class extending CPPObject ) throws NullPointerException because BridJ.getJavaObjectForNativePointer return null in native code (CPPToJavaCallHandler_Sub)
getJavaObjectForNativePointer try to find a NativeObject instance in a WeakHashMap<Long,NativeObject> (knownNativeObjects field in BridJ). It's odd to use Long as weak key. They are garbaged very quickly so a null pointer is thrown because NativeObject instance couldn't be found.