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崩溃的更多相关文章

  1. Android开发之处理崩溃异常

    众所周知,android的设备千差万别,难免会发生崩溃异常等现象,这个时候就需要捕获哪些崩溃异常了,也就是捕获崩溃异常的相关信息,并记录下来,这样一来方便开发人员和测试人员的分析与调试. 1.首先我们 ...

  2. android.view.ViewRootImpl$CalledFromWrongThreadException错误处理

    一般情况下,我们在编写android代码的时候,我们会将一些耗时的操作,比如网络访问.磁盘访问放到一个子线程中来执行.而这类操作往往伴随着UI的更新操作.比如说,访问网络加载一张图片 new Thre ...

  3. Android 编程:calledfromWrongThreadException 的原因

    子线程更新UI会发生Android.view.ViewRoot$CalledFromWrongThreadException异常的解决方法 子线程更新UI 显然假如你的程序需要执行耗时的操作的话,假如 ...

  4. 从零开始的程序逆向之路基础篇 第二章——用OllyDbg(OD)分析一个简单的软件

    作者:Crazyman_Army 原文来自:https://bbs.ichunqiu.com/thread-43469-1-1.html 0x00知识回顾 (由于笔者省事,没开XP虚拟机,而且没关闭A ...

  5. Android:一个高效的UI才是一个拉风的UI(二)

    趁今晚老大不在偷偷早下班,所以有时间继续跟大伙扯扯UI设计之痛,也算一个是对上篇<Android:一个高效的UI才是一个拉风的UI(一)>的完整补充吧.写得不好的话大家尽管拍砖~(来!砸死 ...

  6. Android开发-新建线程崩溃

    一直不满意车机不能实现屏保,最近发现可以通过设置亮度实现,顾萌生了自己写程序的来实现的念头,遂修改原来练手的app.毕竟过去了1年,各类程序.sdk都已经更新了不知道多少版本.经历了痛苦的升级.更新, ...

  7. android 创建一个新的每次project什么时候 请问自己主动 参加 V7依赖?

    android 创建一个新的每次project什么时候 请问自己主动 参加 V7依赖? 分析原因: 主要是由于.我之前的 SDK 的版本号 更新的有点高了.低版本号是不会有这样的问题g的,新版本号中g ...

  8. 发生android.view.ViewRoot$CalledFromWrongThreadException异常的解决方案

    在Android平台下,进行多线程编程时,经常需要在主线程之外的一个单独的线程中进行某些处理,然后更新用户界面显示.但是,在主线线程之外的线程中直接更新页面显示的问题是 报异常:android.vie ...

  9. Android 判断一个 View 是否可见 getLocalVisibleRect(rect) 与 getGlobalVisibleRect(rect)

    Android 判断一个 View 是否可见 getLocalVisibleRect(rect) 与 getGlobalVisibleRect(rect) [TOC] 这两个方法的区别 View.ge ...

随机推荐

  1. 使用webuploader实现大文件断点续传

    IE的自带下载功能中没有断点续传功能,要实现断点续传功能,需要用到HTTP协议中鲜为人知的几个响应头和请求头. 一. 两个必要响应头Accept-Ranges.ETag 客户端每次提交下载请求时,服务 ...

  2. jQuery网页加载的不同方式

    一.window.onload 代码是从上而下执行的,通过window.onload可以使事件在页面加载完毕再执行 注意:window.onload事件多个只会执行最下面的一个,前面的会被覆盖 < ...

  3. python获取当前天气情况

    利用 Python 从互联网公开服务中获取天气预报信息.天气信息来源网站:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx实现以下 ...

  4. 如何在微信小程序中国引入fontawesome字体图标

    fontawesome官网地址:http://fontawesome.dashgame.com/ 一. 二. 下载之后的字体图标 找到 文件中的如下图.ttf文件 三. 在https://transf ...

  5. 问题:python3 使用beautifulSoup时,出错UnicodeDecodeError: 'gbk' codec …….

    想将html文件转为纯文本,用Python3调用beautifulSoup 超简单的代码一直出错,用于打开本地文件: from bs4 import BeautifulSoup file = open ...

  6. P1338 末日的传说,P1372 P1414 又是毕业季——贪心

    一个1到n序列,合理排序逆序对数要求是m,而且字典序要求最小: 这个题,因为数字只能用一次,所以我们可以知道什么位置放什么数逆序对的个数会增加或减少多少: 先求出最多能产生的数量,每次先输出最小的数, ...

  7. rabbitmq 删除所有队列及服务重启脚本

    #!/bin/bash # 删除元数据 rm -rf /var/lib/rabbitmq/mnesia # 重启rabbitmq rabbitmqctl stop systemctl restart ...

  8. Spring Cloud Gateway(三):网关处理器

    1.Spring Cloud Gateway 源码解析概述 API网关作为后端服务的统一入口,可提供请求路由.协议转换.安全认证.服务鉴权.流量控制.日志监控等服务.那么当请求到达网关时,网关都做了哪 ...

  9. (转)glances用法

    借鉴:https://www.ibm.com/developerworks/cn/linux/1304_caoyq_glances/index.html glances 可以为 Unix 和 Linu ...

  10. ibm 汇编

    https://www.ibm.com/developerworks/cn/linux/l-assembly/index.html https://72k.us/file/4031001-328073 ...