Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

jniThrowCppFromJavaException crash -- SIGABRT #314

Open
SteveMobile opened this issue Jun 9, 2017 · 1 comment
Open

jniThrowCppFromJavaException crash -- SIGABRT #314

SteveMobile opened this issue Jun 9, 2017 · 1 comment
Labels

Comments

@SteveMobile
Copy link

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)

@artwyman
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants