当我的应用程序崩溃时,我会在代码中随机获得以下波纹输出(与我可以识别的任何动作无关)。有人可以帮助我解释一下此logcat输出的含义。
我已经截断了文本的大部分,以列出各种线程及其状态(等待,定时等待,阻塞等)以及该线程上方法调用的堆栈跟踪。
07-31 14:39:40.455 942-947/com.salesrabbit.android.sales.universal A/art: art/runtime/jdwp/jdwp_event.cc:681] Check failed: threadId != 0u (threadId=0, 0u=0)
07-31 14:39:43.283 942-947/com.salesrabbit.android.sales.universal A/art: art/runtime/runtime.cc:422] Runtime aborting...
art/runtime/runtime.cc:422] Aborting thread:
art/runtime/runtime.cc:422] "Jit thread pool worker thread 0" prio=5 tid=2 WaitingForDebuggerSend (still starting up)
art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x0 self=0xa8617000
art/runtime/runtime.cc:422] | sysTid=947 nice=9 cgrp=default sched=0/0 handle=0xaf2a3920
art/runtime/runtime.cc:422] | state=R schedstat=( 8833095069 6087499776 14348 ) utm=557 stm=325 core=2 HZ=100
art/runtime/runtime.cc:422] | stack=0xaf1a5000-0xaf1a7000 stackSize=1022KB
art/runtime/runtime.cc:422] | held mutexes= "abort lock"
art/runtime/runtime.cc:422] native: #00 pc 00351069 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
art/runtime/runtime.cc:422] native: #01 pc 00331729 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
art/runtime/runtime.cc:422] native: #02 pc 003247a1 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+24)
art/runtime/runtime.cc:422] native: #03 pc 00324629 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+424)
art/runtime/runtime.cc:422] native: #04 pc 0031b351 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+92)
art/runtime/runtime.cc:422] native: #05 pc 000b526b /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1134)
art/runtime/runtime.cc:422] native: #06 pc 00240305 /system/lib/libart.so (_ZN3art4JDWP9JdwpState19SetWaitForJdwpTokenEy+708)
art/runtime/runtime.cc:422] native: #07 pc 0023fb51 /system/lib/libart.so (_ZN3art4JDWP9JdwpState24AcquireJdwpTokenForEventEy+76)
art/runtime/runtime.cc:422] native: #08 pc 0023f5e1 /system/lib/libart.so (_ZN3art4JDWP9JdwpState29SendRequestAndPossiblySuspendEPNS0_9ExpandBufENS0_17JdwpSuspendPolicyEy+180)
art/runtime/runtime.cc:422] native: #09 pc 0024301b /system/lib/libart.so (_ZN3art4JDWP9JdwpState16PostClassPrepareEPNS_6mirror5ClassE+914)
art/runtime/runtime.cc:422] native: #10 pc 000e4db5 /system/lib/libart.so (_ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE+560)
art/runtime/runtime.cc:422] native: #11 pc 000e4a15 /system/lib/libart.so (_ZN3art11ClassLinker26FindClassInPathClassLoaderERNS_33ScopedObjectAccessAlreadyRunnableEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEEPPNS8_5ClassE+1016)
art/runtime/runtime.cc:422] native: #12 pc 000e55ef /system/lib/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE+658)
art/runtime/runtime.cc:422] native: #13 pc 000d2a3d /system/lib/libart.so (_ZN3art11ClassLinker11ResolveTypeERKNS_7DexFileEtNS_6HandleINS_6mirror8DexCacheEEENS4_INS5_11ClassLoaderEEE+132)
art/runtime/runtime.cc:422] native: #14 pc 001354bd /system/lib/libart-compiler.so (_ZNK3art19HInstructionBuilder25IsOutermostCompilingClassEt+528)
art/runtime/runtime.cc:422] native: #15 pc 00134e5b /system/lib/libart-compiler.so (_ZN3art19HInstructionBuilder16BuildNewInstanceEtj+626)
art/runtime/runtime.cc:422] native: #16 pc 0012ffe7 /system/lib/libart-compiler.so (_ZN3art19HInstructionBuilder21ProcessDexInstructionERKNS_11InstructionEj+3522)
art/runtime/runtime.cc:422] native: #17 pc 0012ece9 /system/lib/libart-compiler.so (_ZN3art19HInstructionBuilder5BuildEv+1176)
art/runtime/runtime.cc:422] native: #18 pc 00113b79 /system/lib/libart-compiler.so (_ZN3art13HGraphBuilder10BuildGraphEv+84)
art/runtime/runtime.cc:422] native: #19 pc 00157ea9 /system/lib/libart-compiler.so (_ZNK3art18OptimizingCompiler10TryCompileEPNS_14ArenaAllocatorEPNS_19CodeVectorAllocatorEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS5_NS_6HandleINS_6mirror8DexCacheEEEPNS_9ArtMethodEb+2452)
art/runtime/runtime.cc:422] native: #20 pc 00159ae3 /system/lib/libart-compiler.so (_ZN3art18OptimizingCompiler10JitCompileEPNS_6ThreadEPNS_3jit12JitCodeCacheEPNS_9ArtMethodEb+330)
art/runtime/runtime.cc:422] native: #21 pc 00108e1f /system/lib/libart-compiler.so (_ZN3art3jit11JitCompiler13CompileMethodEPNS_6ThreadEPNS_9ArtMethodEb+194)
art/runtime/runtime.cc:422] native: #22 pc 00250473 /system/lib/libart.so (_ZN3art3jit3Jit13CompileMethodEPNS_9ArtMethodEPNS_6ThreadEb+318)
art/runtime/runtime.cc:422] native: #23 pc 00251b97 /system/lib/libart.so (_ZN3art3jit14JitCompileTask3RunEPNS_6ThreadE+430)
art/runtime/runtime.cc:422] native: #24 pc 003445a1 /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+44)
art/runtime/runtime.cc:422] native: #25 pc 003440d9 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+64)
art/runtime/runtime.cc:422] native: #26 pc 00047093 /system/lib/libc.so (_ZL15__pthread_startPv+22)
art/runtime/runtime.cc:422] native: #27 pc 00019bdd /system/lib/libc.so (__start_thread+6)
art/runtime/runtime.cc:422] (no managed stack frames)
art/runtime/runtime.cc:422] Dumping all threads without appropriate locks held: thread list lock mutator lock
art/runtime/runtime.cc:422] All threads:
07-31 14:39:43.285 942-947/com.salesrabbit.android.sales.universal A/art: art/runtime/runtime.cc:422] DALVIK THREADS (470):
art/runtime/runtime.cc:422] "Jit thread pool worker thread 0" prio=5 tid=2 Runnable (still starting up)
art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x0 self=0xa8617000
art/runtime/runtime.cc:422] | sysTid=947 nice=9 cgrp=default sched=0/0 handle=0xaf2a3920
art/runtime/runtime.cc:422] | state=R schedstat=( 9523364645 6173422596 15193 ) utm=559 stm=392 core=0 HZ=100
art/runtime/runtime.cc:422] | stack=0xaf1a5000-0xaf1a7000 stackSize=1022KB
art/runtime/runtime.cc:422] | held mutexes= "abort lock" "mutator lock"(shared held)
art/runtime/runtime.cc:422] native: #00 pc 00351069 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
art/runtime/runtime.cc:422] native: #01 pc 00331729 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
art/runtime/runtime.cc:422] native: #02 pc 0034382f /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6T
我已经截断了其他一些线程,
--------- beginning of crash
07-31 14:39:43.630 942-947/com.salesrabbit.android.sales.universal A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 947 (Jit thread pool)
编辑1
我昨天将我的android studio从3.0.1更新到了3.1.3(以及gradle),问题一直持续到今天午餐后才恢复。我试图使缓存无效并重新设置android studio,但它没有任何影响。在测试设备上构建/安装应用程序后约2分钟,我仍然收到此崩溃消息。它发生在我们所有的测试设备上。
编辑2
我刚刚发现,如果我关闭所有断点,崩溃将消失。如果我把断点放回原处,崩溃就会回来。这很烦人!
在下面的代码中,如果我在db.endTransaction()
上设置了一个断点,则应用程序将崩溃。为什么?我该如何解决?
return Single.just(page)
.map {
val db: Database = daoSession.database
db.beginTransaction()
. . . .
db.setTransactionSuccessful()
db.endTransaction()
return@map page
}
.map {
geoCodeAsNeeded(page.addressToGeoCode)
return@map page
}
.map {
return someMethod()
}
.subscribeOn(Schedulers.io())
答案 0 :(得分:3)
正如堆栈跟踪中的这一行所说:
致命信号6(SIGABRT),在tid 8509(Jit线程池)中的代码-6
您的错误是 SIGABRT信号。
1)不要阻塞UI线程,因为操作系统会导致SIGABRT 杀死无响应的应用。
2)确保在“活动”内的OnDestroy中 清理自己。即删除所有监听器/事件 然后调用Base.OnDestory。
3)外部(即BluetoothLeService)服务回调到 您的应用包含监听器,现在为null / nil会导致挂起,因此 SIGABRT,请参阅#2
更多答案:What is fatal signal 6 in android logcat
如果找不到错误位置,则必须通过更改代码部分以进行注释以查看问题是否能够找到它。