我正在测试App,并获得了ANR(仅限Android N,而不是其他版本)。它并不总是在同一个地方发生,并且在调试模式下无法复制。
唯一使用adb pull /data/anr/traces.txt
命令将traces.txt拉出来。 traces.txt中最接近的相关txt位于下方。
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x76134f58 self=0x7b95695a00
| sysTid=4058 nice=-4 cgrp=default sched=0/0 handle=0x7b9944da98
| state=S schedstat=( 4148388502 271817611 2852 ) utm=371 stm=42 core=7 HZ=100
| stack=0x7fdafd1000-0x7fdafd3000 stackSize=8MB
| held mutexes=
kernel: __switch_to+0x8c/0x98
kernel: futex_wait_queue_me+0xd4/0x130
kernel: futex_wait+0xfc/0x210
kernel: do_futex+0xe0/0x920
kernel: SyS_futex+0x11c/0x1b0
kernel: cpu_switch_to+0x48/0x4c
native: #00 pc 000000000001bc6c /system/lib64/libc.so (syscall+28)
native: #01 pc 0000000000069304 /system/lib64/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tbPK8timespec+776)
native: #02 pc 00000000006d4070 /data/app/com.android.chrome-2/base.apk (???)
at org.chromium.android_webview.AwGLFunctor.nativeDestroy(Native method)
at org.chromium.android_webview.AwGLFunctor.access$000(AwGLFunctor.java:23)
at org.chromium.android_webview.AwGLFunctor$DestroyRunnable.run(AwGLFunctor.java:36)
at org.chromium.content.common.CleanupReference.runCleanupTaskInternal(CleanupReference.java:164)
at org.chromium.content.common.CleanupReference.access$300(CleanupReference.java:33)
at org.chromium.content.common.CleanupReference$LazyHolder$1.handleMessage(CleanupReference.java:96)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke!(Native method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
但我无法解释它。它看起来与一些webview onDestroy代码有关。但我不确定。请告知我如何才能进一步调试此问题,或者之前遇到此问题的任何人可以解决这个问题?