Android NDK 2.1 crash scenario

55 views
Skip to first unread message

Gabe Martin

unread,
Mar 18, 2011, 6:18:09 PM3/18/11
to andro...@googlegroups.com
So I have an NDK app working on 2.2 and above devices but it crashes during load on 2.1 devices. From what I can tell it's not even reaching the JNI_OnLoad function.

I'm guessing that it's crashing on 2.1 devices in some static initializer code so I'm having a really difficult time debugging it. Any suggestions?

Below is the log from the crash.

DEBUG/dalvikvm(246): Trying to load lib /data/data/com.test.androidtest/lib/libtestCoreJni.so 0x43d0b9f0
INFO/DEBUG(28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
INFO/DEBUG(28): Build fingerprint: 'generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys'
INFO/DEBUG(28): pid: 246, tid: 246  >>> com.test.androidtest <<<
INFO/DEBUG(28): signal 4 (SIGILL), fault addr 81000000
INFO/DEBUG(28):  r0 8150f380  r1 81438519  r2 81000000  r3 81000000
INFO/DEBUG(28):  r4 815011ec  r5 bef19744  r6 00000000  r7 00000001
INFO/DEBUG(28):  r8 ad00f380  r9 0000bd00  10 4104bc38  fp 00000000
INFO/DEBUG(28):  ip 815012cc  sp bef19728  lr 814385a5  pc 81000000  cpsr a0000010
INFO/DEBUG(28):          #00  pc 00000000  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):          #01  pc 004385a2  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28): code around lr:
INFO/DEBUG(28): 81438594 d0052b00 49124811 44794478 eab0f586 
INFO/DEBUG(28): 814385a4 447b4b10 4b0c6818 2b0058e3 f586d010 
INFO/DEBUG(28): 814385b4 2800ea8a 2004d00c ff9cf7fe 58e34b0a 
INFO/DEBUG(28): stack:
INFO/DEBUG(28):     bef196e8  afe065b0  /system/lib/libc.so
INFO/DEBUG(28):     bef196ec  afe021d0  /system/lib/libc.so
INFO/DEBUG(28):     bef196f0  bef19800  [stack]
INFO/DEBUG(28):     bef196f4  b000f448  /system/bin/linker
INFO/DEBUG(28):     bef196f8  b000fd00  /system/bin/linker
INFO/DEBUG(28):     bef196fc  815010fc  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef19700  00000000  
INFO/DEBUG(28):     bef19704  b00004ef  /system/bin/linker
INFO/DEBUG(28):     bef19708  b00163d0  
INFO/DEBUG(28):     bef1970c  b000f448  /system/bin/linker
INFO/DEBUG(28):     bef19710  b000fd00  /system/bin/linker
INFO/DEBUG(28):     bef19714  815010fc  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef19718  00000000  
INFO/DEBUG(28):     bef1971c  b0000559  /system/bin/linker
INFO/DEBUG(28):     bef19720  df002777  
INFO/DEBUG(28):     bef19724  e3a070ad  
INFO/DEBUG(28): #01 bef19728  8150a450  
INFO/DEBUG(28):     bef1972c  815011ec  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef19730  00000000  
INFO/DEBUG(28):     bef19734  8143878f  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef19738  8117a865  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef1973c  b000fac4  /system/bin/linker
INFO/DEBUG(28):     bef19740  bef197bc  [stack]
INFO/DEBUG(28):     bef19744  b000fa01  /system/bin/linker
INFO/DEBUG(28):     bef19748  afe42ad4  
INFO/DEBUG(28):     bef1974c  815011ec  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef19750  8150f3a0  
INFO/DEBUG(28):     bef19754  00000000  
INFO/DEBUG(28):     bef19758  00000001  
INFO/DEBUG(28):     bef1975c  814362e9  /data/data/com.test.androidtest/lib/libtestCoreJni.so
INFO/DEBUG(28):     bef19760  004f6115  
INFO/DEBUG(28):     bef19764  b0000647  /system/bin/linker
INFO/DEBUG(28):     bef19768  00000000  
INFO/DEBUG(28):     bef1976c  815011ec  /data/data/com.test.androidtest/lib/libtestCoreJni.so

Any help or suggestions would be appreciated.

İsmail Dönmez

unread,
Mar 18, 2011, 6:21:27 PM3/18/11
to andro...@googlegroups.com, Gabe Martin
If you are trying to load a C++ library your backtrace looks like http://code.google.com/p/android/issues/detail?id=14351

Regards,
ismail

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Gabe Martin

unread,
Mar 18, 2011, 6:35:13 PM3/18/11
to İsmail Dönmez, andro...@googlegroups.com
I am trying to load a C++ library and I am linking against gnustl_static. I'll try patching my ndk and see if it fixes it.

Thanks İsmail
Reply all
Reply to author
Forward
0 new messages