在应用程序的生命周期内,我们收到消息“App”已停止。所有方法当前都有try和catch子句,但是我们无法捕获这个未处理的异常。 我们已经尝试了一切,但却找不到这个罪魁祸首。我们已经设法获取应用程序的android日志,所以有人可以提供一个问题,以了解问题可能是什么?
日志:
06-20 09:23:42.711 12647 12647 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 12647 (mSales.mSales)
06-20 09:23:42.794 12878 12878 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-20 09:23:42.794 12878 12878 F DEBUG : Build fingerprint: 'samsung/gts28ltexx/gts28lte:7.0/NRD90M/T715XXU2CQCL:user/release-keys'
06-20 09:23:42.794 12878 12878 F DEBUG : Revision: '9'
06-20 09:23:42.794 12878 12878 F DEBUG : ABI: 'arm'
06-20 09:23:42.794 12878 12878 F DEBUG : pid: 12647, tid: 12647, name: mSales.mSales >>> mSales.mSales <<<
06-20 09:23:42.795 12878 12878 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
06-20 09:23:42.799 12878 12878 F DEBUG : Abort message: 'art/runtime/indirect_reference_table.cc:128] JNI ERROR (app bug): weak global reference table overflow (max=51200)'
06-20 09:23:42.800 12878 12878 F DEBUG : r0 00000000 r1 00003167 r2 00000006 r3 00000008
06-20 09:23:42.800 12878 12878 F DEBUG : r4 a778558c r5 00000006 r6 a7785534 r7 0000010c
06-20 09:23:42.800 12878 12878 F DEBUG : r8 a447d464 r9 00000000 sl bed88338 fp a4469ed4
06-20 09:23:42.800 12878 12878 F DEBUG : ip 00000002 sp bed88268 lr a5f8b4b7 pc a5f8dd20 cpsr 600f0010
06-20 09:23:42.819 12878 12878 F DEBUG :
06-20 09:23:42.819 12878 12878 F DEBUG : backtrace:
06-20 09:23:42.819 12878 12878 F DEBUG : #00 pc 0004ad20 /system/lib/libc.so (tgkill+12)
06-20 09:23:42.819 12878 12878 F DEBUG : #01 pc 000484b3 /system/lib/libc.so (pthread_kill+34)
06-20 09:23:42.819 12878 12878 F DEBUG : #02 pc 0001dd89 /system/lib/libc.so (raise+10)
06-20 09:23:42.819 12878 12878 F DEBUG : #03 pc 00019511 /system/lib/libc.so (__libc_android_abort+34)
06-20 09:23:42.819 12878 12878 F DEBUG : #04 pc 00017150 /system/lib/libc.so (abort+4)
06-20 09:23:42.819 12878 12878 F DEBUG : #05 pc 0031b3bd /system/lib/libart.so (_ZN3art7Runtime5AbortEv+252)
06-20 09:23:42.819 12878 12878 F DEBUG : #06 pc 000b4ccb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
06-20 09:23:42.819 12878 12878 F DEBUG : #07 pc 001bd093 /system/lib/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+194)
06-20 09:23:42.819 12878 12878 F DEBUG : #08 pc 0023a72f /system/lib/libart.so (_ZN3art9JavaVMExt16AddWeakGlobalRefEPNS_6ThreadEPNS_6mirror6ObjectE+46)
06-20 09:23:42.819 12878 12878 F DEBUG : #09 pc 0027ff63 /system/lib/libart.so (_ZN3art3JNI16NewWeakGlobalRefEP7_JNIEnvP8_jobject+418)
06-20 09:23:42.819 12878 12878 F DEBUG : #10 pc 0000b5cf /data/app/mSales.mSales-1/lib/arm/libmonodroid.so
06-20 09:23:42.819 12878 12878 F DEBUG : #11 pc 00009e71 /data/app/mSales.mSales-1/lib/arm/libmonodroid.so
06-20 09:23:42.819 12878 12878 F DEBUG : #12 pc 002326c8 /data/app/mSales.mSales-1/lib/arm/libmonosgen-2.0.so
06-20 09:38:19.287 15440 15440 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 15440 (mSales.mSales)
06-20 09:38:19.369 15630 15630 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-20 09:38:19.369 15630 15630 F DEBUG : Build fingerprint: 'samsung/gts28ltexx/gts28lte:7.0/NRD90M/T715XXU2CQCL:user/release-keys'
06-20 09:38:19.369 15630 15630 F DEBUG : Revision: '9'
06-20 09:38:19.369 15630 15630 F DEBUG : ABI: 'arm'
06-20 09:38:19.370 15630 15630 F DEBUG : pid: 15440, tid: 15440, name: mSales.mSales >>> mSales.mSales <<<
06-20 09:38:19.370 15630 15630 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
06-20 09:38:19.375 15630 15630 F DEBUG : Abort message: 'art/runtime/indirect_reference_table.cc:128] JNI ERROR (app bug): weak global reference table overflow (max=51200)'
06-20 09:38:19.375 15630 15630 F DEBUG : r0 00000000 r1 00003c50 r2 00000006 r3 00000008
06-20 09:38:19.375 15630 15630 F DEBUG : r4 a778558c r5 00000006 r6 a7785534 r7 0000010c
06-20 09:38:19.375 15630 15630 F DEBUG : r8 a447d464 r9 00000000 sl bed88c00 fp a4469ed4
06-20 09:38:19.375 15630 15630 F DEBUG : ip 00000002 sp bed88b30 lr a5f8b4b7 pc a5f8dd20 cpsr 600f0010
06-20 09:38:19.394 15630 15630 F DEBUG :
06-20 09:38:19.394 15630 15630 F DEBUG : backtrace:
06-20 09:38:19.394 15630 15630 F DEBUG : #00 pc 0004ad20 /system/lib/libc.so (tgkill+12)
06-20 09:38:19.394 15630 15630 F DEBUG : #01 pc 000484b3 /system/lib/libc.so (pthread_kill+34)
06-20 09:38:19.394 15630 15630 F DEBUG : #02 pc 0001dd89 /system/lib/libc.so (raise+10)
06-20 09:38:19.394 15630 15630 F DEBUG : #03 pc 00019511 /system/lib/libc.so (__libc_android_abort+34)
06-20 09:38:19.395 15630 15630 F DEBUG : #04 pc 00017150 /system/lib/libc.so (abort+4)
06-20 09:38:19.395 15630 15630 F DEBUG : #05 pc 0031b3bd /system/lib/libart.so (_ZN3art7Runtime5AbortEv+252)
06-20 09:38:19.395 15630 15630 F DEBUG : #06 pc 000b4ccb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
06-20 09:38:19.395 15630 15630 F DEBUG : #07 pc 001bd093 /system/lib/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+194)
06-20 09:38:19.395 15630 15630 F DEBUG : #08 pc 0023a72f /system/lib/libart.so (_ZN3art9JavaVMExt16AddWeakGlobalRefEPNS_6ThreadEPNS_6mirror6ObjectE+46)
06-20 09:38:19.395 15630 15630 F DEBUG : #09 pc 0027ff63 /system/lib/libart.so (_ZN3art3JNI16NewWeakGlobalRefEP7_JNIEnvP8_jobject+418)
06-20 09:38:19.395 15630 15630 F DEBUG : #10 pc 0000b5cf /data/app/mSales.mSales-1/lib/arm/libmonodroid.so
06-20 09:38:19.395 15630 15630 F DEBUG : #11 pc 00009e71 /data/app/mSales.mSales-1/lib/arm/libmonodroid.so
06-20 09:38:19.395 15630 15630 F DEBUG : #12 pc 002326c8 /data/app/mSales.mSales-1/lib/arm/libmonosgen-2.0.so
06-20 09:58:55.045 17536 17536 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 17536 (mSales.mSales)
06-20 09:58:55.120 17740 17740 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-20 09:58:55.120 17740 17740 F DEBUG : Build fingerprint: 'samsung/gts28ltexx/gts28lte:7.0/NRD90M/T715XXU2CQCL:user/release-keys'
06-20 09:58:55.120 17740 17740 F DEBUG : Revision: '9'
06-20 09:58:55.120 17740 17740 F DEBUG : ABI: 'arm'
06-20 09:58:55.120 17740 17740 F DEBUG : pid: 17536, tid: 17536, name: mSales.mSales >>> mSales.mSales <<<
06-20 09:58:55.120 17740 17740 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
06-20 09:58:55.124 17740 17740 F DEBUG : Abort message: 'art/runtime/indirect_reference_table.cc:128] JNI ERROR (app bug): weak global reference table overflow (max=51200)'
06-20 09:58:55.124 17740 17740 F DEBUG : r0 00000000 r1 00004480 r2 00000006 r3 00000008
06-20 09:58:55.124 17740 17740 F DEBUG : r4 a778558c r5 00000006 r6 a7785534 r7 0000010c
06-20 09:58:55.124 17740 17740 F DEBUG : r8 a447d464 r9 00000000 sl bed89018 fp a4469ed4
06-20 09:58:55.125 17740 17740 F DEBUG : ip 00000002 sp bed88f48 lr a5f8b4b7 pc a5f8dd20 cpsr 600f0010
06-20 09:58:55.143 17740 17740 F DEBUG :
06-20 09:58:55.143 17740 17740 F DEBUG : backtrace:
06-20 09:58:55.143 17740 17740 F DEBUG : #00 pc 0004ad20 /system/lib/libc.so (tgkill+12)
06-20 09:58:55.143 17740 17740 F DEBUG : #01 pc 000484b3 /system/lib/libc.so (pthread_kill+34)
06-20 09:58:55.143 17740 17740 F DEBUG : #02 pc 0001dd89 /system/lib/libc.so (raise+10)
06-20 09:58:55.143 17740 17740 F DEBUG : #03 pc 00019511 /system/lib/libc.so (__libc_android_abort+34)
06-20 09:58:55.143 17740 17740 F DEBUG : #04 pc 00017150 /system/lib/libc.so (abort+4)
06-20 09:58:55.143 17740 17740 F DEBUG : #05 pc 0031b3bd /system/lib/libart.so (_ZN3art7Runtime5AbortEv+252)
06-20 09:58:55.143 17740 17740 F DEBUG : #06 pc 000b4ccb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
06-20 09:58:55.143 17740 17740 F DEBUG : #07 pc 001bd093 /system/lib/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+194)
06-20 09:58:55.143 17740 17740 F DEBUG : #08 pc 0023a72f /system/lib/libart.so (_ZN3art9JavaVMExt16AddWeakGlobalRefEPNS_6ThreadEPNS_6mirror6ObjectE+46)
06-20 09:58:55.143 17740 17740 F DEBUG : #09 pc 0027ff63 /system/lib/libart.so (_ZN3art3JNI16NewWeakGlobalRefEP7_JNIEnvP8_jobject+418)
06-20 09:58:55.143 17740 17740 F DEBUG : #10 pc 0000b5cf /data/app/mSales.mSales-1/lib/arm/libmonodroid.so
06-20 09:58:55.143 17740 17740 F DEBUG : #11 pc 00009e71 /data/app/mSales.mSales-1/lib/arm/libmonodroid.so
06-20 09:58:55.143 17740 17740 F DEBUG : #12 pc 002326c8 /data/app/mSales.mSales-1/lib/arm/libmonosgen-2.0.so
答案 0 :(得分:0)
这里的关键是'弱全局引用表溢出(max = 51200)'。基本上,您将保留对从JNI调用返回的内容的引用,并且永远不会释放它。
最好的办法是通过JNI调用的地方,并检查一旦完成后删除引用。
如果您没有进行JNI呼叫,那么您可能仍然需要保留不再需要的参考。注意嵌套引用,它们永远不会被垃圾收集,并且会在应用程序的整个生命周期中累积,直到遇到操作系统级别异常。