在4.0.3之前的Android下运行时,本机库中的分段错误

时间:2012-05-21 09:27:38

标签: java android java-native-interface native-code native-methods

libFidoCore.so是我的本机库,我在Android的ICS 4.0.3版本中从这个库调用java函数这个库运行良好而不会崩溃,但在Android 2.3.3或Android 2.3.4上我的应用程序崩溃了以下日志。为什么?

05-21 09:20:17.539: I/DEBUG(73): Build fingerprint: 'google/soju/crespo:2.3.3/GRI40/102588:user/release-keys'
05-21 09:20:17.539: I/DEBUG(73): pid: 725, tid: 756  >>> com.fido.android.framework.service <<<
05-21 09:20:17.539: I/DEBUG(73): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000043
05-21 09:20:17.539: I/DEBUG(73):  r0 00000033  r1 00000001  r2 00000000  r3 00000000
05-21 09:20:17.539: I/DEBUG(73):  r4 00000033  r5 002a8d90  r6 00000000  r7 4051a9c0
05-21 09:20:17.539: I/DEBUG(73):  r8 001dfb38  r9 0000002d  10 804cbc7c  fp 804b4108
05-21 09:20:17.539: I/DEBUG(73):  ip afa03108  sp 44b3bd20  lr 8004be0f  pc 80054a7c  cpsr 60000030
05-21 09:20:17.539: I/DEBUG(73):  d0  54454e3a303a655f  d1  006500640061004f
05-21 09:20:17.539: I/DEBUG(73):  d2  006800280020004b  d3  006500640061002e
05-21 09:20:17.539: I/DEBUG(73):  d4  766f72503a3a7265  d5  2d2d206e6f697369
05-21 09:20:17.539: I/DEBUG(73):  d6  2d2d2d2d2d2d2d2d  d7  2d2d2d2d2d2d2d2d
05-21 09:20:17.539: I/DEBUG(73):  d8  0000000000000000  d9  0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  d10 0000000000000000  d11 0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  d12 0000000000000000  d13 0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  d14 0000000000000000  d15 0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  d16 0000000700000033  d17 3fe0000000000000
05-21 09:20:17.539: I/DEBUG(73):  d18 42eccefa43de3400  d19 3fbc71c71c71c71c
05-21 09:20:17.539: I/DEBUG(73):  d20 4008000000000000  d21 3fd99a27ad32ddf5
05-21 09:20:17.539: I/DEBUG(73):  d22 3fd24998d6307188  d23 3fcc7288e957b53b
05-21 09:20:17.539: I/DEBUG(73):  d24 3fc74721cad6b0ed  d25 3fc39a09d078c69f
05-21 09:20:17.539: I/DEBUG(73):  d26 0000000000000000  d27 0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  d28 0000000000000000  d29 0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  d30 0000000000000000  d31 0000000000000000
05-21 09:20:17.539: I/DEBUG(73):  scr 80000012
05-21 09:20:17.617: I/DEBUG(73):          #00  pc 00054a7c  /system/lib/libdvm.so
05-21 09:20:17.617: I/DEBUG(73):          #01  pc 0004be0a  /system/lib/libdvm.so
05-21 09:20:17.621: I/DEBUG(73): code around pc:
05-21 09:20:17.621: I/DEBUG(73): 80054a5c 688b0010 0045eb00 0110f113 0144eb01 
05-21 09:20:17.621: I/DEBUG(73): 80054a6c ee98f7c2 bf00bd70 41f0e92d b3184604 
05-21 09:20:17.621: I/DEBUG(73): 80054a7c f2406903 688174ff f1116945 eb060610 
05-21 09:20:17.621: I/DEBUG(73): 80054a8c 23000643 4618462a 5af1e00b 2f7e1e4f 
05-21 09:20:17.621: I/DEBUG(73): 80054a9c 42a1d905 3003d901 3002e002 3001e000 
05-21 09:20:17.621: I/DEBUG(73): code around lr:
05-21 09:20:17.621: I/DEBUG(73): 8004bdec 000411e4 6905b570 2101460c 46164628 
05-21 09:20:17.621: I/DEBUG(73): 8004bdfc ff80f006 b10eb174 70332301 f0084620 
05-21 09:20:17.621: I/DEBUG(73): 8004be0c 4604fe33 4806b930 49064622 44794478 
05-21 09:20:17.621: I/DEBUG(73): 8004be1c fd8ef7f9 21074628 ff6cf006 bd704620 
05-21 09:20:17.621: I/DEBUG(73): 8004be2c 0003e892 00041175 6904b570 2101460d 
05-21 09:20:17.621: I/DEBUG(73): stack:
05-21 09:20:17.621: I/DEBUG(73):     44b3bce0  44b3bd14  
05-21 09:20:17.621: I/DEBUG(73):     44b3bce4  00000000  
05-21 09:20:17.621: I/DEBUG(73):     44b3bce8  00000019  
05-21 09:20:17.621: I/DEBUG(73):     44b3bcec  804e0138  
05-21 09:20:17.621: I/DEBUG(73):     44b3bcf0  44b3bd14  
05-21 09:20:17.621: I/DEBUG(73):     44b3bcf4  46636a61  
05-21 09:20:17.621: I/DEBUG(73):     44b3bcf8  804b429c  /data/data/com.fido.android.framework.service/lib/libFidoCore.so
05-21 09:20:17.621: I/DEBUG(73):     44b3bcfc  804cbc7c  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd00  00000033  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd04  80000000  /system/lib/libdvm.so
05-21 09:20:17.625: I/DEBUG(73):     44b3bd08  4051a9c0  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd0c  80468e60  /data/data/com.fido.android.framework.service/lib/libFidoCore.so
05-21 09:20:17.625: I/DEBUG(73):     44b3bd10  804d8138  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd14  804b42dc  /data/data/com.fido.android.framework.service/lib/libFidoCore.so
05-21 09:20:17.625: I/DEBUG(73):     44b3bd18  df002777  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd1c  e3a070ad  
05-21 09:20:17.625: I/DEBUG(73): #00 44b3bd20  00000033  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd24  002a8d90  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd28  00000000  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd2c  4051a9c0  
05-21 09:20:17.625: I/DEBUG(73):     44b3bd30  001dfb38  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd34  8004be0f  /system/lib/libdvm.so
05-21 09:20:17.628: I/DEBUG(73): #01 44b3bd38  00000001  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd3c  00000033  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd40  80000000  /system/lib/libdvm.so
05-21 09:20:17.628: I/DEBUG(73):     44b3bd44  80467009  /data/data/com.fido.android.framework.service/lib/libFidoCore.so
05-21 09:20:17.628: I/DEBUG(73):     44b3bd48  4058f7f0  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd4c  00000000  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd50  0000005c  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd54  4232a448  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd58  0000029c  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd5c  000003bc  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd60  000005c0  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd64  4051a7c8  
05-21 09:20:17.628: I/DEBUG(73):     44b3bd68  44b3bde0  
05-21 09:20:17.632: I/DEBUG(73):     44b3bd6c  44b3bddc  
05-21 09:20:17.632: I/DEBUG(73):     44b3bd70  4232a47c  
05-21 09:20:17.632: I/DEBUG(73):     44b3bd74  44b3bd84  
05-21 09:20:17.632: I/DEBUG(73):     44b3bd78  804d8138  
05-21 09:20:17.632: I/DEBUG(73):     44b3bd7c  002abaa4  
05-21 09:20:17.953: I/BootReceiver(108): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
05-21 09:20:17.964: I/DEBUG(73): debuggerd committing suicide to free the zombie!

1 个答案:

答案 0 :(得分:0)

在ICS中处理JNI引用的方式发生了变化。这篇博文解释了它:http://android-developers.blogspot.ch/2011/11/jni-local-reference-changes-in-ics.html

这取决于您的targetSdkVersion,也许您可​​以尝试将其设置得更低以使用兼容模式。