原因分析
*
如/data/anr/trace.txt日志内容:
"main"prio=5tid=1NATIVE
|group="main"sCount=1dsCount=0obj=0x40a74460self=0x1eb3a38
|sysTid=6144nice=0sched=0/0cgrp=defaulthandle=1074308232
|schedstat=(583691772091086800750096936)utm=4942stm=894core=0
atandroid.webkit.WebView.nativeWordSelection(NativeMethod)
atandroid.webkit.WebView.setUpSelect(WebView.java:5505)
atandroid.webkit.WebView.selectText(WebView.java:4439)
atandroid.webkit.WebView.selectText(WebView.java:4432)
atandroid.webkit.WebView.performLongClick(WebView.java:4417)
atandroid.webkit.WebView$PrivateHandler.handleMessage(WebView.java:8459)
atandroid.os.Handler.dispatchMessage(Handler.java:99)
atandroid.os.Looper.loop(Looper.java:137)
atandroid.app.ActivityThread.main(ActivityThread.java:4437)
atjava.lang.reflect.Method.invokeNative(NativeMethod)
atjava.lang.reflect.Method.invoke(Method.java:511)
atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
atcom.android.internal.os.ZygoteInit.main(ZygoteInit.java:552)
atdalvik.system.NativeStart.main(NativeMethod)
从以上日志可推断,webkit调用本地方法nativeWordSelection时出现的阻塞以至于ANR。
从以上日志可推断,webkit调用本地方法nativeWordSelection时出现的阻塞以至于ANR。
本文分析了一段关于Android WebView出现ANR(Application Not Responding)的日志。通过对日志中关键信息的解读,确定了问题出现在WebKit调用本地方法nativeWordSelection时产生的阻塞。
2万+

被折叠的 条评论
为什么被折叠?



