android - Webview causes ANR -
i have written app displays html pages in webviews, managed in viewpager. working ok, have had few anrs when swiping 1 page another. anr data dump shows main thread has called through threadedrenderer.nsyncanddrawframe() calls native method, apparently communicates renderer thread, , waits thread complete drawing view. since both of these executing native code it's hard work out what's going on appears renderer thread has never signalled main thread resume, hence causing anr. there nothing in logcat prior anr report suggests problem.
does have suggestions how troubleshoot this? assuming call threadedrenderer.nsyncanddrawframe() associated webview, don't have confirm that.
the problem not repeatable, in sense if restart app , navigate same page showing when anr occurred, doesn't happen again. device nexus 7 running android 5.1.
anr stacktrace main , renderer threads:
"main" prio=5 tid=1 native | group="main" scount=1 dscount=0 obj=0x73547000 self=0xb4827800 | systid=1248 nice=-6 cgrp=default sched=0/0 handle=0xb6fd6bec | state=s schedstat=( 0 0 0 ) utm=6035 stm=1406 core=0 hz=100 | stack=0xbe5a6000-0xbe5a8000 stacksize=8mb | held mutexes= kernel: (couldn't read /proc/self/task/1248/stack) native: #00 pc 000133b8 /system/lib/libc.so (syscall+28) native: #01 pc 00016a81 /system/lib/libc.so (__pthread_cond_timedwait_relative(pthread_cond_t*, pthread_mutex_t*, timespec const*)+56) native: #02 pc 0003c73b /system/lib/libhwui.so (???) native: #03 pc 0003c771 /system/lib/libhwui.so (???) native: #04 pc 0083fd83 /data/dalvik-cache/arm/system@framework@boot.oat (java_android_view_threadedrenderer_nsyncanddrawframe__jjjf+134) @ android.view.threadedrenderer.nsyncanddrawframe(native method) @ android.view.threadedrenderer.draw(threadedrenderer.java:340) @ android.view.viewrootimpl.draw(viewrootimpl.java:2530) @ android.view.viewrootimpl.performdraw(viewrootimpl.java:2352) @ android.view.viewrootimpl.performtraversals(viewrootimpl.java:1982) @ android.view.viewrootimpl.dotraversal(viewrootimpl.java:1061) @ android.view.viewrootimpl$traversalrunnable.run(viewrootimpl.java:5885) @ android.view.choreographer$callbackrecord.run(choreographer.java:767) @ android.view.choreographer.docallbacks(choreographer.java:580) @ android.view.choreographer.doframe(choreographer.java:550) @ android.view.choreographer$framedisplayeventreceiver.run(choreographer.java:753) @ android.os.handler.handlecallback(handler.java:739) @ android.os.handler.dispatchmessage(handler.java:95) @ android.os.looper.loop(looper.java:135) @ android.app.activitythread.main(activitythread.java:5254) @ java.lang.reflect.method.invoke!(native method) @ java.lang.reflect.method.invoke(method.java:372) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:903) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:698) "renderthread" prio=5 tid=26 native | group="main" scount=1 dscount=0 obj=0x12c07820 self=0xa1c30800 | systid=1303 nice=-4 cgrp=default sched=0/0 handle=0xa1c44c00 | state=s schedstat=( 0 0 0 ) utm=8314 stm=1817 core=0 hz=100 | stack=0xa0cc2000-0xa0cc4000 stacksize=1012kb | held mutexes= kernel: (couldn't read /proc/self/task/1303/stack) native: #00 pc 000133b8 /system/lib/libc.so (syscall+28) native: #01 pc 0001741b /system/lib/libc.so (__futex_wait_ex+42) native: #02 pc 00017761 /system/lib/libc.so (pthread_mutex_lock+230) native: #03 pc 0001d767 /system/vendor/lib/libgsl.so (os_mutex_lock+6) native: #04 pc 0001ea88 /system/vendor/lib/egl/libegl_adreno.so (eglidodestroyeglimage+180) native: #05 pc 0008698d /system/vendor/lib/egl/libglesv2_adreno.so (rb_image_try_release+32) native: #06 pc 00086acf /system/vendor/lib/egl/libglesv2_adreno.so (rb_destroy_resource_updates_pure+136) native: #07 pc 00085491 /system/vendor/lib/egl/libglesv2_adreno.so (rb_perform_resolve+276) native: #08 pc 00085761 /system/vendor/lib/egl/libglesv2_adreno.so (rb_resolve+464) native: #09 pc 0008a891 /system/vendor/lib/egl/libglesv2_adreno.so (rb_surface_swap+228) native: #10 pc 0006af89 /system/vendor/lib/egl/libglesv2_adreno.so (gl2_surface_swap+76) native: #11 pc 0005d12b /system/vendor/lib/egl/libglesv2_adreno.so (oglswapbuffer+194) native: #12 pc 00013ddc /system/vendor/lib/egl/libegl_adreno.so (qegldrvapi_eglswapbuffers+1776) native: #13 pc 00007b60 /system/vendor/lib/egl/libegl_adreno.so (eglswapbuffers+16) native: #14 pc 0001237f /system/lib/libegl.so (eglswapbuffers+290) native: #15 pc 0003d291 /system/lib/libhwui.so (???) native: #16 pc 0003bd05 /system/lib/libhwui.so (???) native: #17 pc 0003beb5 /system/lib/libhwui.so (???) native: #18 pc 0003caed /system/lib/libhwui.so (???) native: #19 pc 0003e743 /system/lib/libhwui.so (android::uirenderer::renderthread::renderthread::threadloop()+66) native: #20 pc 000104d5 /system/lib/libutils.so (android::thread::_threadloop(void*)+112) native: #21 pc 0005f839 /system/lib/libandroid_runtime.so (android::androidruntime::javathreadshell(void*)+72) native: #22 pc 00010045 /system/lib/libutils.so (???) native: #23 pc 00016baf /system/lib/libc.so (__pthread_start(void*)+30) native: #24 pc 00014af3 /system/lib/libc.so (__start_thread+6)
i faced issue seems chromium bug, related latest chromium webview 43.0.23567.121. try rollback webview on app , check again. me issue reproducable @ latest webview version.
Comments
Post a Comment