您的位置:首页 > 移动开发 > Android开发

java.util.concurrent.TimeoutException: android.view.ThreadedRenderer.finalize() timed out after 10 s

2017-10-31 20:03 1756 查看
是因为5.0上webView启动硬件加速,可能导致的bug.   stackOverFlow查询如下:

32down
votefavorite

12

I am getting this strange crash reports on Lollipop. My app is basically a browser so it makes heavy use of the WebView but I don't know that the issue is happening there. Anyways the crash report doesn't give much useful information, it is essentially what
I am pasting below:
java.util.concurrent.TimeoutException: android.view.ThreadedRenderer.finalize() timed out after 10 seconds
at android.view.ThreadedRenderer.nDeleteProxy(Native Method)
at android.view.ThreadedRenderer.finalize(ThreadedRenderer.java:398)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:190)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:173)
at java.lang.Thread.run(Thread.java:818)


Has anyone seen this? any idea what might be causing it?

EDIT: I should mention that this is happening on an app which I've had for about 10 months and it has always only targeted 4.0+ devices. The bug is only being reported on 5.0 devices and that stacktrace above is all the Play Store Console gives me.



android
 android-5.0-lollipop
shareimprove
this question
edited Dec
1 '14 at 19:50

asked Dec
1 '14 at 16:02





casolorz

1,20893285

 
1 
Is 
android:hardwareAccelerated
 set
to 
true
 ? – ToYonos Dec
5 '14 at 11:37
 
Yes although I'm probably going to
change it to false in the near future because of a different bug with WebView. – casolorz Dec
5 '14 at 15:51
 
Most likely, you are tripping over
a bug in Android 5.0 itself. Reading the source code, it seems unlikely that there is something that you are doing that would cause the native 
nDeleteProxy()
 method
to hang. If you wind up being able to reproduce the bug at some point, upload a test project as part of an issue to b.android.com. – CommonsWare Dec
8 '14 at 0:58
 
Thanks for the info. I was starting
to think the same thing but I just have not been able to reproduce. I think my two 5.0 bugs I have are mostly happening on Nexus 5 devices which is the one Nexus device I don't have for testing. – casolorz Dec
8 '14 at 2:55
2 
I have same error but I don't use 
WebView
 – Choletski Dec
12 '16 at 12:57
show 3 more
comments


2 Answers

activeoldestvotes

up
vote6down
vote
Since KitKat, I have issues with 
WebViews
 (freeze,
crash)

I have resolved these issues deactivating hardware acceleration for 
webViews
.
It could work for you.
if (Build.VERSION.SDK_INT >= 19) // KITKAT
{
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}


shareimprove
this answer
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐