djinni icon indicating copy to clipboard operation
djinni copied to clipboard

jniThrowCppFromJavaException crash -- SIGABRT

Open SteveMobile opened this issue 7 years ago • 1 comments

0 libc.so + 0x3a67c 1 libc.so + 0x181a1 2 libc.so + 0x14ae7 3 dalvik-main space (deleted) + 0xde8e7e 4 system@[email protected] + 0xe49fe 5 boot.oat + 0x296eaab 6 system@[email protected] + 0xe49fe 7 printf_core(...) at vfprintf.c:677 (librcrtc.so) 8 libc.so + 0x12aae 9 readEncodedPointer(...) at cxa_personality.cpp:296 (libcore.so) 10 libm.so + 0x4abd 11 libm.so + 0x4aba 12 scan_eh_tab(...) at cxa_personality.cpp:629 (libcore.so) 13 libart.so + 0x1eae0b 14 boot.oat + 0x218387 15 libm.so + 0x4abb 16 djinni::jniThrowCppFromJavaException(...) at djinni_support.cpp:146 (libcore.so)

SteveMobile avatar Jun 09 '17 02:06 SteveMobile

Not much to go on to debug here. @SteveMobile do you want to share more specifics of the use case? This stack trace includes a lot of system stuff which is hard to understand.

djinni_support:146 is a call to jniGetThreadEnv() (inside of a comparison function). If there's inlining involved you might actually be seeing the assert at line 50 here: https://github.com/dropbox/djinni/blob/master/support-lib/jni/djinni_support.cpp#L50

If that's the case, it might occur because JNI_OnLoad() was never called, so the global g_cachedJVM variable was never populated. You might want to verify that you included djinni_main.cpp in your JNI library, or else called djinni::jniInit() from your own JNI_OnLoad function.

artwyman avatar Jun 10 '17 03:06 artwyman