java - TimeoutException: WebViewClassic.finalize() timed out after 10 seconds -
i use android webview, dynamically added , removed based on timers. have noticed few crashes caused following exception.
java.util.concurrent.timeoutexception: android.webkit.webviewclassic.finalize() timed out after 10 seconds @ android.os.messagequeue.enqueuemessage(messagequeue.java:318) @ android.os.handler.enqueuemessage(handler.java:626) @ android.os.handler.sendmessageatfrontofqueue(handler.java:618) @ android.webkit.webviewcore$eventhub.sendmessageatfrontofqueue(webviewcore.java:1873) @ android.webkit.webviewcore$eventhub.access$7200(webviewcore.java:1063) @ android.webkit.webviewcore.destroy(webviewcore.java:1987) @ android.webkit.webviewclassic.destroyjava(webviewclassic.java:2208) @ android.webkit.webviewclassic.destroy(webviewclassic.java:2183) @ android.webkit.webviewclassic.finalize(webviewclassic.java:4266) @ java.lang.daemons$finalizerdaemon.dofinalize(daemons.java:187) @ java.lang.daemons$finalizerdaemon.run(daemons.java:170) @ java.lang.thread.run(thread.java:841)
i cannot find root of problem. tried disabling hardware acceleration, did not work.
view.setlayertype(view.layer_type_software, null);
my code creating webview looks this.
public static void setupwebview(webview view, string url) { view.loadurl(url); view.setlayertype(view.layer_type_software, null); // did not fix timeoutexception view.getsettings().setloadwithoverviewmode(true); view.getsettings().setusewideviewport(true); view.getsettings().setjavascriptenabled(true); view.getsettings().setdomstorageenabled(true); view.getsettings().setsaveformdata(false); // make web view handle links on visited pages view.setwebviewclient(new webviewclient() { @override public boolean shouldoverrideurlloading(webview view, string url) { view.loadurl(url); return true; } }); }
i remove view calling parent.removeview(webview)
on parent view.
any ideas lead me solving problem?
the system runs on android devices >= 4.2.2.
Comments
Post a Comment