[Android] 分析一个CalledFromWrongThreadException崩溃
1 问题描述
问题本身比较清晰简单,但推敲的过程中发现了不少有意思的东西。
在C++ SDK回调JNI至Java Observer函数中,直接操作了UI界面textView.setText(msg),第一次回调没有崩溃,第二次回调(或者退出Activity)时才会崩溃。奇怪不?崩溃栈信息如下:
- ::07.503 W ackor : [KLH]OnNotifyClick - jenv=0x920544c0
- ::07.503 W ackor : [KLH]OnNotifyClick - jenv=0x920544c0, swigjobj=0x200001
- ::07.528 I KLH : ThreadID=, 您点击了 路线
- ::07.528 I KLH : 切换备选线路:
- ::25.546 W ackor : [KLH]OnNotifyClick - jenv=0x920544c0
- ::25.602 F art : art/runtime/java_vm_ext.cc:] JNI DETECTED ERROR IN APPLICATION: JNI NewLocalRef called with pending exception android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.ViewRootImpl.checkThread() (ViewRootImpl.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.ViewRootImpl.requestLayout() (ViewRootImpl.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.RelativeLayout.requestLayout() (RelativeLayout.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.checkForRelayout() (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType, boolean, int) (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType) (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.setText(java.lang.CharSequence) (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void com.autonavi.auto.activity.guide.GuideActivity$.onNotifyClick(com.autonavi.gbl.map.layer.BaseLayer, com.autonavi.gbl.map.layer.LayerItem) (GuideActivity.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void com.autonavi.gbl.map.router.LayerClickObserverRouter.onNotifyClick(com.autonavi.gbl.map.layer.impl.BaseLayerImpl, com.autonavi.gbl.map.layer.impl.LayerItemImpl) (LayerClickObserverRouter.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void com.autonavi.gbl.map.layer.observer.impl.MapLayerObserverJNI.SwigDirector_ILayerClickObserverImpl_onNotifyClick(com.autonavi.gbl.map.layer.observer.impl.ILayerClickObserverImpl, com.autonavi.gbl.map.layer.impl.BaseLayerImpl, com.autonavi.gbl.map.layer.impl.LayerItemImpl) (MapLayerObserverJNI.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:]
- ::25.602 F art : art/runtime/java_vm_ext.cc:] in call to NewLocalRef
- ::25.602 F art : art/runtime/java_vm_ext.cc:] "Thread-1066" prio= tid= Runnable
- ::25.602 F art : art/runtime/java_vm_ext.cc:] | group="main" sCount= dsCount= obj=0x13cae0a0 self=0x924bd100
- ::25.602 F art : art/runtime/java_vm_ext.cc:] | sysTid= nice=- cgrp=default sched=/ handle=0x978bf930
- ::25.602 F art : art/runtime/java_vm_ext.cc:] | state=R schedstat=( ) utm= stm= core= HZ=
- ::25.602 F art : art/runtime/java_vm_ext.cc:] | stack=0x977c3000-0x977c5000 stackSize=1014KB
- ::25.602 F art : art/runtime/java_vm_ext.cc:] | held mutexes= "mutator lock"(shared held)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 003715ef /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 0035050b /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEP12BacktraceMap+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 0025a81b /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 0025aef5 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 000fd491 /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 001025a5 /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 00107b59 /system/lib/libart.so (_ZN3art8CheckJNI11NewLocalRefEP7_JNIEnvP8_jobject+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 001dff93 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 00718f85 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 006fbd57 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 0070d2d9 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 007018bd /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 006dced5 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 0070ebcd /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 0070ed61 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 001998e5 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl17BaseMessageLooper13onProcMessageEPNS_7MessageE+)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] native: # pc 001996b1 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Looper4loopEv+)
- ::25.603 F art : art/runtime/java_vm_ext.cc:] native: # pc 0016ba47 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl13MessageThread3runEv+)
- ::25.603 F art : art/runtime/java_vm_ext.cc:] native: # pc 0016902d /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Thread11runCallbackEPv+)
- ::25.603 F art : art/runtime/java_vm_ext.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.603 F art : art/runtime/java_vm_ext.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.603 F art : art/runtime/java_vm_ext.cc:] (no managed stack frames)
- ::25.603 F art : art/runtime/java_vm_ext.cc:]
- ::25.856 F art : art/runtime/runtime.cc:] Runtime aborting...
- ::25.856 F art : art/runtime/runtime.cc:] Aborting thread:
- ::25.856 F art : art/runtime/runtime.cc:] "Thread-1066" prio= tid= Native
- ::25.856 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x13cae0a0 self=0x924bd100
- ::25.856 F art : art/runtime/runtime.cc:] | sysTid= nice=- cgrp=default sched=/ handle=0x978bf930
- ::25.856 F art : art/runtime/runtime.cc:] | state=R schedstat=( ) utm= stm= core= HZ=
- ::25.856 F art : art/runtime/runtime.cc:] | stack=0x977c3000-0x977c5000 stackSize=1014KB
- ::25.856 F art : art/runtime/runtime.cc:] | held mutexes= "abort lock"
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 003715ef /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 0035050b /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEP12BacktraceMap+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 003339f5 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 00333c93 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 000f48bb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 0025ab45 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 0025aef5 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 000fd491 /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 001025a5 /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.+)
- ::25.856 F art : art/runtime/runtime.cc:] native: # pc 00107b59 /system/lib/libart.so (_ZN3art8CheckJNI11NewLocalRefEP7_JNIEnvP8_jobject+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 001dff93 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 00718f85 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 006fbd57 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0070d2d9 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 007018bd /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 006dced5 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0070ebcd /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0070ed61 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 001998e5 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl17BaseMessageLooper13onProcMessageEPNS_7MessageE+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 001996b1 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Looper4loopEv+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0016ba47 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl13MessageThread3runEv+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0016902d /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Thread11runCallbackEPv+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.857 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.857 F art : art/runtime/runtime.cc:] Pending exception android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.ViewRootImpl.checkThread() (ViewRootImpl.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.ViewRootImpl.requestLayout() (ViewRootImpl.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.widget.RelativeLayout.requestLayout() (RelativeLayout.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.widget.TextView.checkForRelayout() (TextView.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType, boolean, int) (TextView.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType) (TextView.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void android.widget.TextView.setText(java.lang.CharSequence) (TextView.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void com.autonavi.auto.activity.guide.GuideActivity$.onNotifyClick(com.autonavi.gbl.map.layer.BaseLayer, com.autonavi.gbl.map.layer.LayerItem) (GuideActivity.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void com.autonavi.gbl.map.router.LayerClickObserverRouter.onNotifyClick(com.autonavi.gbl.map.layer.impl.BaseLayerImpl, com.autonavi.gbl.map.layer.impl.LayerItemImpl) (LayerClickObserverRouter.java:)
- ::25.857 F art : art/runtime/runtime.cc:] at void com.autonavi.gbl.map.layer.observer.impl.MapLayerObserverJNI.SwigDirector_ILayerClickObserverImpl_onNotifyClick(com.autonavi.gbl.map.layer.observer.impl.ILayerClickObserverImpl, com.autonavi.gbl.map.layer.impl.BaseLayerImpl, com.autonavi.gbl.map.layer.impl.LayerItemImpl) (MapLayerObserverJNI.java:)
- ::25.857 F art : art/runtime/runtime.cc:] Dumping all threads without appropriate locks held: thread list lock mutator lock
- ::25.857 F art : art/runtime/runtime.cc:] All threads:
- ::25.857 F art : art/runtime/runtime.cc:] DALVIK THREADS ():
- ::25.857 F art : art/runtime/runtime.cc:] "Thread-1066" prio= tid= Runnable
- ::25.857 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x13cae0a0 self=0x924bd100
- ::25.857 F art : art/runtime/runtime.cc:] | sysTid= nice=- cgrp=default sched=/ handle=0x978bf930
- ::25.857 F art : art/runtime/runtime.cc:] | state=R schedstat=( ) utm= stm= core= HZ=
- ::25.857 F art : art/runtime/runtime.cc:] | stack=0x977c3000-0x977c5000 stackSize=1014KB
- ::25.857 F art : art/runtime/runtime.cc:] | held mutexes= "abort lock" "mutator lock"(shared held)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 003715ef /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0035050b /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEP12BacktraceMap+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0035ae17 /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0035b9e9 /system/lib/libart.so (_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureEb+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 0035c0d3 /system/lib/libart.so (_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+)
- ::25.857 F art : art/runtime/runtime.cc:] native: # pc 00333c09 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 000f48bb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0025ab45 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0025aef5 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 000fd491 /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 001025a5 /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00107b59 /system/lib/libart.so (_ZN3art8CheckJNI11NewLocalRefEP7_JNIEnvP8_jobject+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 001dff93 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00718f85 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 006fbd57 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0070d2d9 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 007018bd /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 006dced5 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0070ebcd /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0070ed61 /data/app/com.autonavi.auto-/lib/arm/libGbl.so (???)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 001998e5 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl17BaseMessageLooper13onProcMessageEPNS_7MessageE+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 001996b1 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Looper4loopEv+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0016ba47 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl13MessageThread3runEv+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0016902d /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Thread11runCallbackEPv+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.858 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.858 F art : art/runtime/runtime.cc:]
- ::25.858 F art : art/runtime/runtime.cc:] "main" prio= tid= Native
- ::25.858 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x743223b0 self=0xb4d36500
- ::25.858 F art : art/runtime/runtime.cc:] | sysTid= nice=- cgrp=default sched=/ handle=0xb6fb9b34
- ::25.858 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.858 F art : art/runtime/runtime.cc:] | stack=0xbe5f1000-0xbe5f3000 stackSize=8MB
- ::25.858 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0004099c /system/lib/libc.so (__epoll_pwait+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00019f63 /system/lib/libc.so (epoll_pwait+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00019f71 /system/lib/libc.so (epoll_wait+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00012ce7 /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00012f63 /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00086d11 /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0000055d /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+)
- ::25.858 F art : art/runtime/runtime.cc:] at android.os.MessageQueue.nativePollOnce(Native method)
- ::25.858 F art : art/runtime/runtime.cc:] at android.os.MessageQueue.next(MessageQueue.java:)
- ::25.858 F art : art/runtime/runtime.cc:] at android.os.Looper.loop(Looper.java:)
- ::25.858 F art : art/runtime/runtime.cc:] at android.app.ActivityThread.main(ActivityThread.java:)
- ::25.858 F art : art/runtime/runtime.cc:] at java.lang.reflect.Method.invoke!(Native method)
- ::25.858 F art : art/runtime/runtime.cc:] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:)
- ::25.858 F art : art/runtime/runtime.cc:] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:)
- ::25.858 F art : art/runtime/runtime.cc:]
- ::25.858 F art : art/runtime/runtime.cc:] "Signal Catcher" prio= tid= WaitingInMainSignalCatcherLoop
- ::25.858 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d530a0 self=0xaec66500
- ::25.858 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb42ac930
- ::25.858 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.858 F art : art/runtime/runtime.cc:] | stack=0xb41b0000-0xb41b2000 stackSize=1014KB
- ::25.858 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 00040c70 /system/lib/libc.so (__rt_sigtimedwait+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0001ca57 /system/lib/libc.so (sigwait+)
- ::25.858 F art : art/runtime/runtime.cc:] native: # pc 0033a80d /system/lib/libart.so (_ZN3art13SignalCatcher13WaitForSignalEPNS_6ThreadERNS_9SignalSetE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 0033b96f /system/lib/libart.so (_ZN3art13SignalCatcher3RunEPv+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.859 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.859 F art : art/runtime/runtime.cc:]
- ::25.859 F art : art/runtime/runtime.cc:] "JDWP" prio= tid= WaitingInMainDebuggerLoop
- ::25.859 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d560a0 self=0xab3d1500
- ::25.859 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb41a8930
- ::25.859 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.859 F art : art/runtime/runtime.cc:] | stack=0xb40ac000-0xb40ae000 stackSize=1014KB
- ::25.859 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 00040b8c /system/lib/libc.so (__pselect6+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 0001bda9 /system/lib/libc.so (select+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 00401a93 /system/lib/libart.so (_ZN3art4JDWP12JdwpAdbState15ProcessIncomingEv+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 00266f3f /system/lib/libart.so (_ZN3art4JDWP9JdwpState3RunEv+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 00267dbd /system/lib/libart.so (_ZN3art4JDWPL15StartJdwpThreadEPv+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.859 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.859 F art : art/runtime/runtime.cc:]
- ::25.859 F art : art/runtime/runtime.cc:] "ReferenceQueueDaemon" prio= tid= Waiting
- ::25.859 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d4fd00 self=0xab3d1f00
- ::25.859 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb40a2930
- ::25.859 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.859 F art : art/runtime/runtime.cc:] | stack=0xb3fa0000-0xb3fa2000 stackSize=1038KB
- ::25.859 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libc.so (syscall+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 000f6e09 /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 002bed09 /system/lib/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadExibNS_11ThreadStateE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 002bfa67 /system/lib/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadEPNS_6mirror6ObjectExibNS_11ThreadStateE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 002d1333 /system/lib/libart.so (_ZN3artL11Object_waitEP7_JNIEnvP8_jobject+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 0000036f /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__+)
- ::25.859 F art : art/runtime/runtime.cc:] at java.lang.Object.wait!(Native method)
- ::25.859 F art : art/runtime/runtime.cc:] - waiting on <0x0d838ddd> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
- ::25.859 F art : art/runtime/runtime.cc:] at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:)
- ::25.859 F art : art/runtime/runtime.cc:] - locked <0x0d838ddd> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
- ::25.859 F art : art/runtime/runtime.cc:] at java.lang.Thread.run(Thread.java:)
- ::25.859 F art : art/runtime/runtime.cc:]
- ::25.859 F art : art/runtime/runtime.cc:] "FinalizerDaemon" prio= tid= Waiting
- ::25.859 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d4fd60 self=0xab3d2900
- ::25.859 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb3f98930
- ::25.859 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.859 F art : art/runtime/runtime.cc:] | stack=0xb3e96000-0xb3e98000 stackSize=1038KB
- ::25.859 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libc.so (syscall+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 000f6e09 /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 002bed09 /system/lib/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadExibNS_11ThreadStateE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 002bfa67 /system/lib/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadEPNS_6mirror6ObjectExibNS_11ThreadStateE+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 002d136d /system/lib/libart.so (_ZN3artL13Object_waitJIEP7_JNIEnvP8_jobjectxi+)
- ::25.859 F art : art/runtime/runtime.cc:] native: # pc 0000055d /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__JI+)
- ::25.859 F art : art/runtime/runtime.cc:] at java.lang.Object.wait!(Native method)
- ::25.859 F art : art/runtime/runtime.cc:] - waiting on <0x0c2aed52> (a java.lang.ref.ReferenceQueue)
- ::25.859 F art : art/runtime/runtime.cc:] at java.lang.Object.wait(Object.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:)
- ::25.860 F art : art/runtime/runtime.cc:] - locked <0x0c2aed52> (a java.lang.ref.ReferenceQueue)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Thread.run(Thread.java:)
- ::25.860 F art : art/runtime/runtime.cc:]
- ::25.860 F art : art/runtime/runtime.cc:] "FinalizerWatchdogDaemon" prio= tid= Sleeping
- ::25.860 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d4fdc0 self=0xab3d2e00
- ::25.860 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb3e8e930
- ::25.860 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.860 F art : art/runtime/runtime.cc:] | stack=0xb3d8c000-0xb3d8e000 stackSize=1038KB
- ::25.860 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libc.so (syscall+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 000f7089 /system/lib/libart.so (_ZN3art17ConditionVariable9TimedWaitEPNS_6ThreadExi+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 002bea5f /system/lib/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadExibNS_11ThreadStateE+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 002bfa67 /system/lib/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadEPNS_6mirror6ObjectExibNS_11ThreadStateE+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 0001b8db /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Thread_sleep__Ljava_lang_Object_2JI+)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Thread.sleep!(Native method)
- ::25.860 F art : art/runtime/runtime.cc:] - sleeping on <0x02023823> (a java.lang.Object)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Thread.sleep(Thread.java:)
- ::25.860 F art : art/runtime/runtime.cc:] - locked <0x02023823> (a java.lang.Object)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Thread.sleep(Thread.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Thread.run(Thread.java:)
- ::25.860 F art : art/runtime/runtime.cc:]
- ::25.860 F art : art/runtime/runtime.cc:] "HeapTaskDaemon" prio= tid= Blocked
- ::25.860 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d4fe20 self=0xab3d3d00
- ::25.860 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb3d84930
- ::25.860 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.860 F art : art/runtime/runtime.cc:] | stack=0xb3c82000-0xb3c84000 stackSize=1038KB
- ::25.860 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libc.so (syscall+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 000f6e09 /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 001d75dd /system/lib/libart.so (_ZN3art2gc13TaskProcessor7GetTaskEPNS_6ThreadE+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 001d7b11 /system/lib/libart.so (_ZN3art2gc13TaskProcessor11RunAllTasksEPNS_6ThreadE+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 0000036f /data/dalvik-cache/arm/system@framework@boot.oat (Java_dalvik_system_VMRuntime_runHeapTasks__+)
- ::25.860 F art : art/runtime/runtime.cc:] at dalvik.system.VMRuntime.runHeapTasks(Native method)
- ::25.860 F art : art/runtime/runtime.cc:] - waiting to lock an unknown object
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Daemons$HeapTaskDaemon.run(Daemons.java:)
- ::25.860 F art : art/runtime/runtime.cc:] at java.lang.Thread.run(Thread.java:)
- ::25.860 F art : art/runtime/runtime.cc:]
- ::25.860 F art : art/runtime/runtime.cc:] "Binder:32666_1" prio= tid= Native
- ::25.860 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d650a0 self=0xaec67900
- ::25.860 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb3b7e930
- ::25.860 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.860 F art : art/runtime/runtime.cc:] | stack=0xb3a82000-0xb3a84000 stackSize=1014KB
- ::25.860 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 00040ac4 /system/lib/libc.so (__ioctl+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libc.so (ioctl+)
- ::25.860 F art : art/runtime/runtime.cc:] native: # pc 0001e9e9 /system/lib/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc 0001eed7 /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc 0001eff1 /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc 0002393d /system/lib/libbinder.so (???)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc 00063bff /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.861 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.861 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.861 F art : art/runtime/runtime.cc:]
- ::25.861 F art : art/runtime/runtime.cc:] "Binder:32666_2" prio= tid= Native
- ::25.861 F art : art/runtime/runtime.cc:] | group="" sCount= dsCount= obj=0x12d690a0 self=0xab3d5100
- ::25.861 F art : art/runtime/runtime.cc:] | sysTid= nice= cgrp=default sched=/ handle=0xb3a7a930
- ::25.861 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.861 F art : art/runtime/runtime.cc:] | stack=0xb397e000-0xb3980000 stackSize=1014KB
- ::25.861 F art : art/runtime/runtime.cc:] | held mutexes=
- ::25.863 F art : art/runtime/runtime.cc:] native: # pc 0016ba47 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl13MessageThread3runEv+)
- ::25.864 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.864 F art : art/runtime/runtime.cc:] native: # pc 0016902d /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl6Thread11runCallbackEPv+)
- ::25.864 F art : art/runtime/runtime.cc:] native: # pc /system/lib/libc.so (syscall+)
- ::25.864 F art : art/runtime/runtime.cc:] native: # pc 0003f383 /system/lib/libc.so (_ZL33__pthread_cond_timedwait_relativeP23pthread_cond_internal_tP15pthread_mutex_tPK8timespec+)
- ::25.865 F art : art/runtime/runtime.cc:] native: # pc 001a9049 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl9LockLinux4waitEv+)
- ::25.865 F art : art/runtime/runtime.cc:] native: # pc 001a9049 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl9LockLinux4waitEv+)
- ::25.865 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.865 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.865 F art : art/runtime/runtime.cc:] native: # pc 006a6b63 /data/app/com.autonavi.auto-/lib/arm/libGNaviDice.so (???)
- ::25.865 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.865 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.866 F art : art/runtime/runtime.cc:] (no managed stack frames)
- ::25.866 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.866 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.866 F art : art/runtime/runtime.cc:] native: # pc 006a6b63 /data/app/com.autonavi.auto-/lib/arm/libGNaviDice.so (???)
- ::25.866 F art : art/runtime/runtime.cc:] | state=S schedstat=( ) utm= stm= core= HZ=
- ::25.867 F art : art/runtime/runtime.cc:] native: # pc 0003f567 /system/lib/libc.so (_ZL15__pthread_startPv+)
- ::25.867 F art : art/runtime/runtime.cc:] native: # pc 001a9049 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (_ZN3asl9LockLinux4waitEv+)
- ::25.867 F art : art/runtime/runtime.cc:] native: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::25.888 E amap_so : useMyCorkscrew
- ::25.889 E dumpcrash_log: pid: , tid: , useNewSignalAbortCatcher: , isHeapError:
- ::26.140 I amap_so : new catcher
- ::26.215 I amap_so : backtrace: # pc /system/lib/libc.so (tgkill+)
- ::26.216 I amap_so : backtrace: # pc 0003fc65 /system/lib/libc.so (pthread_kill+)
- ::26.216 I amap_so : backtrace: # pc 0001c403 /system/lib/libc.so (raise+)
- ::26.216 I amap_so : backtrace: # pc 000195b5 /system/lib/libc.so (__libc_android_abort+)
- ::26.216 I amap_so : backtrace: # pc /system/lib/libc.so (abort+)
- ::26.216 I amap_so : backtrace: # pc 00325b41 /system/lib/libart.so (art::Runtime::Abort()+)
- ::26.216 I amap_so : backtrace: # pc 000e68bb /system/lib/libart.so (art::LogMessage::~LogMessage()+)
- ::26.216 I amap_so : backtrace: # pc 0024cb45 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+)
- ::26.216 I amap_so : backtrace: # pc 0024cef5 /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+)
- ::26.216 I amap_so : backtrace: # pc 000ef491 /system/lib/libart.so (art::ScopedCheck::AbortF(char const*, ...)+)
- ::26.216 I amap_so : backtrace: # pc 000f45a5 /system/lib/libart.so (art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::JniValueType*) [clone .constprop.]+)
- ::26.216 I amap_so : backtrace: # pc 000f9b59 /system/lib/libart.so (art::CheckJNI::NewLocalRef(_JNIEnv*, _jobject*)+)
- ::26.216 I amap_so : backtrace: # pc 001dff93 /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 00718f85 /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 006fbd57 /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 0070d2d9 /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 007018bd /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 006dced5 /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 0070ebcd /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 0070ed61 /data/app/com.autonavi.auto-/lib/arm/libGbl.so
- ::26.217 I amap_so : backtrace: # pc 001998e5 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (asl::BaseMessageLooper::onProcMessage(asl::Message*)+)
- ::26.217 I amap_so : backtrace: # pc 001996b1 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (asl::Looper::loop()+)
- ::26.217 I amap_so : backtrace: # pc 0016ba47 /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (asl::MessageThread::run()+)
- ::26.217 I amap_so : backtrace: # pc 0016902d /data/app/com.autonavi.auto-/lib/arm/libbase_utils.so (asl::Thread::runCallback(void*)+)
- ::26.217 I amap_so : backtrace: # pc 0003f567 /system/lib/libc.so (__pthread_start(void*)+)
- ::26.218 I amap_so : backtrace: # pc 00019c37 /system/lib/libc.so (__start_thread+)
- ::26.285 E dumpcrash_log: start dumpExecute
- ::26.286 E dumpcrash_log: end dumpExecute
- ::26.286 W System.err: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
- ::26.286 W System.err: at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:)
- ::26.286 W System.err: at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:)
- ::26.286 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.view.View.requestLayout(View.java:)
- ::26.287 W System.err: at android.widget.TextView.checkForRelayout(TextView.java:)
- ::26.287 W System.err: at android.widget.TextView.setText(TextView.java:)
- ::26.287 W System.err: at android.widget.TextView.setText(TextView.java:)
- ::26.287 W System.err: at android.widget.TextView.setText(TextView.java:)
- ::26.287 W System.err: at com.autonavi.auto.activity.guide.GuideActivity$.onNotifyClick(GuideActivity.java:)
- ::26.287 W System.err: at com.autonavi.gbl.map.router.LayerClickObserverRouter.onNotifyClick(LayerClickObserverRouter.java:)
- ::26.287 W System.err: at com.autonavi.gbl.map.layer.observer.impl.MapLayerObserverJNI.SwigDirector_ILayerClickObserverImpl_onNotifyClick(MapLayerObserverJNI.java:)
- ::31.738 F libc : Fatal signal (SIGABRT), code - in tid (Thread-)
2 原因分析
从崩溃栈中可以清晰看到原因,轻松得到如下结论:
2.1 非UI线程操作UI是Android不允许的
有人总结了Android平台下UI线程理解经验:
Single Thread Model
1. 一个组件的创建并不会新建一个线程,他们的创建都在UI线程中进行,包括他们的回调方法,如onKeyDown()。
2. 当在UI线程中进行某些耗时的操作时,将会阻塞UI线程,一般阻塞超过5秒就会显示一个ANR对话框。
3. UI线程是非线程安全的,所以,不能在工作线程中操作UI元素。 两个原则
1. Do not block the UI thread (不要阻塞UI线程)
2. Do not access the Android UI toolkit from outside the UI thread (不要在工作线程中操作UI元素) 在工作线程更新UI方法
1. Activity.runOnUiThread(Runnable)
2. Handler
sendMessage(Message)
post(Runnable)
3. AsyncTask
execute()
doInBackground()
onPostExecute()
2.2 引发了JNI层崩溃
关于这一点,特别增加了日志可以确认,崩溃是因为NewLocalRef的时候发现有pending exception
3 推理过程
(1)为何第一次Java exception没有直接崩溃退出?
(2)如果说setText导致崩溃,那么为何设置“路径 1234567890”会崩溃,而设置“终点”二字却总也没崩溃?
这里先来分析第一点,直接给出下面答案:
3.1 JNI层处理Exception并不会立即崩溃
请参考这篇文章:《JNI官方规范中文版——如何在JNI中抛出Java异常》
在我们的JNI层中,并没有调用
3.2 Android层Exception触发机制
先参考下这两篇背景知识:《Android View重绘与更新》《Android不能在子线程更新UI的讨论和分析》
从崩溃栈信息其实也能看出来,崩溃栈的关键信息有:
- ::25.602 F art : art/runtime/java_vm_ext.cc:] JNI DETECTED ERROR IN APPLICATION: JNI NewLocalRef called with pending exception android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.ViewRootImpl.checkThread() (ViewRootImpl.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.ViewRootImpl.requestLayout() (ViewRootImpl.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.RelativeLayout.requestLayout() (RelativeLayout.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.view.View.requestLayout() (View.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.checkForRelayout() (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType, boolean, int) (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType) (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void android.widget.TextView.setText(java.lang.CharSequence) (TextView.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void com.autonavi.auto.activity.guide.GuideActivity$.onNotifyClick(com.autonavi.gbl.map.layer.BaseLayer, com.autonavi.gbl.map.layer.LayerItem) (GuideActivity.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void com.autonavi.gbl.map.router.LayerClickObserverRouter.onNotifyClick(com.autonavi.gbl.map.layer.impl.BaseLayerImpl, com.autonavi.gbl.map.layer.impl.LayerItemImpl) (LayerClickObserverRouter.java:)
- ::25.602 F art : art/runtime/java_vm_ext.cc:] at void com.autonavi.gbl.map.layer.observer.impl.MapLayerObserverJNI.SwigDirector_ILayerClickObserverImpl_onNotifyClick(com.autonavi.gbl.map.layer.observer.impl.ILayerClickObserverImpl, com.autonavi.gbl.map.layer.impl.BaseLayerImpl, com.autonavi.gbl.map.layer.impl.LayerItemImpl) (MapLayerObserverJNI.java:)
这里面有一个requestLayout,可以查到该函数用于Android控件的布局刷新,里面调用到ViewRootImpl.checkThread就会检查线程ID并抛异常。
那如果没有触发requestLayout调用是不是就不会做这个ThreadID检查和抛异常了呢?是的!
3.3 解答疑问
(1)首次回调时,因JNI层缺少ExceptionCheck() 和相应的处理逻辑,导致Java exception并不会立即崩溃而是逻辑继续。。。当(二次回调)发生NewLocalRef等操作发生时才检测到有pending exception引发崩溃
(2)非UI线程操作UI基本上都会崩溃,通过try...catch可以轻松获取信息。前提是需要触发checkThread调用。
(3)Android在setText操作需要重新刷新Layout时才会有CheckThread,进而引发崩溃。Text太短了不会触发requestLayout,哈哈
[Android] 分析一个CalledFromWrongThreadException崩溃的更多相关文章
- Android开发之处理崩溃异常
众所周知,android的设备千差万别,难免会发生崩溃异常等现象,这个时候就需要捕获哪些崩溃异常了,也就是捕获崩溃异常的相关信息,并记录下来,这样一来方便开发人员和测试人员的分析与调试. 1.首先我们 ...
- android.view.ViewRootImpl$CalledFromWrongThreadException错误处理
一般情况下,我们在编写android代码的时候,我们会将一些耗时的操作,比如网络访问.磁盘访问放到一个子线程中来执行.而这类操作往往伴随着UI的更新操作.比如说,访问网络加载一张图片 new Thre ...
- Android 编程:calledfromWrongThreadException 的原因
子线程更新UI会发生Android.view.ViewRoot$CalledFromWrongThreadException异常的解决方法 子线程更新UI 显然假如你的程序需要执行耗时的操作的话,假如 ...
- 从零开始的程序逆向之路基础篇 第二章——用OllyDbg(OD)分析一个简单的软件
作者:Crazyman_Army 原文来自:https://bbs.ichunqiu.com/thread-43469-1-1.html 0x00知识回顾 (由于笔者省事,没开XP虚拟机,而且没关闭A ...
- Android:一个高效的UI才是一个拉风的UI(二)
趁今晚老大不在偷偷早下班,所以有时间继续跟大伙扯扯UI设计之痛,也算一个是对上篇<Android:一个高效的UI才是一个拉风的UI(一)>的完整补充吧.写得不好的话大家尽管拍砖~(来!砸死 ...
- Android开发-新建线程崩溃
一直不满意车机不能实现屏保,最近发现可以通过设置亮度实现,顾萌生了自己写程序的来实现的念头,遂修改原来练手的app.毕竟过去了1年,各类程序.sdk都已经更新了不知道多少版本.经历了痛苦的升级.更新, ...
- android 创建一个新的每次project什么时候 请问自己主动 参加 V7依赖?
android 创建一个新的每次project什么时候 请问自己主动 参加 V7依赖? 分析原因: 主要是由于.我之前的 SDK 的版本号 更新的有点高了.低版本号是不会有这样的问题g的,新版本号中g ...
- 发生android.view.ViewRoot$CalledFromWrongThreadException异常的解决方案
在Android平台下,进行多线程编程时,经常需要在主线程之外的一个单独的线程中进行某些处理,然后更新用户界面显示.但是,在主线线程之外的线程中直接更新页面显示的问题是 报异常:android.vie ...
- Android 判断一个 View 是否可见 getLocalVisibleRect(rect) 与 getGlobalVisibleRect(rect)
Android 判断一个 View 是否可见 getLocalVisibleRect(rect) 与 getGlobalVisibleRect(rect) [TOC] 这两个方法的区别 View.ge ...
随机推荐
- soap协议测试
soap就是http发送xml数据 1.soap协议提包含下列元素,红色标注为必须 2.soap消息基本结构 3.http+xml方式测试soap协议
- vue自定义弹框
vue 全局自定义简单弹框 https://www.jianshu.com/p/1307329aa09e https://www.cnblogs.com/crazycode2/p/7907905.ht ...
- dumpe/dumpe2fs/e2fsck
xt2/3/4文件系统备份工具 导出ext2/ext3/ext4文件系统信息 dumpe2fs e2fsck 强制检查文件系统 检查文件系统
- 洛谷P1006 传纸条(多维DP)
小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题.一次素质拓展活动中,班上同学安排做成一个mm行nn列的矩阵,而小渊和小轩被安排在矩阵对角线的两端,因此,他们就无法直接交谈了.幸运的是,他们 ...
- 一个Maven项目在eclipse中正常,但在IDEA中启动时报错
这个项目十有八九最初是在ecplise创建的,框架上十有八九整合了Mybatis,报的错误十有八九是 org.apache.ibatis.binding.BindingException: Inval ...
- C++ 结构体指针的定义
struct node { …… } ; struct node *p1, *p2 ; typedef struct node { …… }Node; typedef Node* pNode; typ ...
- 胜利点 选题 Scrum立会报告+燃尽图 02
此作业要求参见[https://edu.cnblogs.com/campus/nenu/2019fall/homework/8683] 一.小组介绍 组长:贺敬文 组员:彭思雨 王志文 位军营 杨萍 ...
- DELPHI解析JSON格式化的日期
DELPHI解析JSON格式化的日期 json返回的日期是 /Date(1560355200000)/ 这样的格式. 这个1560355200000,是指1970年以后的秒数. DELPHI如何解析这 ...
- oracle利用触发器实现主键字段自增
我们都知道oracle主键自增利用的是序列sequence.我们先创建一个sequence: create sequence test_sequence start increment maxvalu ...
- sql 从服务器取消主从复制
mysql>change master to master_host='' mysql>stop slave;reset slave;