简体   繁体   English

Android RenderScript FinalizerWatchdogDaemon致命异常

[英]Android RenderScript FinalizerWatchdogDaemon Fatal Exception

I use RenderScript in my app to do several image processing tasks. 我在我的应用程序中使用RenderScript来执行多个图像处理任务。

Sometimes, I randomly get the following exception: 有时候,我会随机获得以下异常:

10-10 15:27:04.479: E/AndroidRuntime(2113): FATAL EXCEPTION: FinalizerWatchdogDaemon
10-10 15:27:04.479: E/AndroidRuntime(2113): java.util.concurrent.TimeoutException: android.renderscript.Type.finalize() timed out after 10 seconds
10-10 15:27:04.479: E/AndroidRuntime(2113):     at android.renderscript.RenderScript.nObjDestroy(RenderScript.java:216)
10-10 15:27:04.479: E/AndroidRuntime(2113):     at android.renderscript.BaseObj.finalize(BaseObj.java:116)
10-10 15:27:04.479: E/AndroidRuntime(2113):     at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:187)
10-10 15:27:04.479: E/AndroidRuntime(2113):     at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
10-10 15:27:04.479: E/AndroidRuntime(2113):     at java.lang.Thread.run(Thread.java:856)

All my RenderScript-Calls are enclosed by a Semaphore to prevent that the same script is running parallel. 我的所有RenderScript-Calls都被信号量包围,以防止同一个脚本并行运行。 Can anybody tell me what this message means and how I can prevent it? 任何人都可以告诉我这条消息的含义以及我如何预防它?

Do you have a very long running kernel? 你有一个很长的内核吗?

This thread is attempting to cleanup RS objects when the GC removes the java code reference. 当GC删除java代码引用时,此线程正在尝试清理RS对象。 If there is a very long running kernel it may be blocked long enough to trigger what you are seeing. 如果有一个运行时间非常长的内核,它可能会被阻塞足够长的时间以触发您所看到的内容。 We don't allow objects to be modified by an external thread while a kernel is running, so in effect that external thread is blocked until kernel completion. 我们不允许在内核运行时由外部线程修改对象,因此实际上外部线程被阻塞直到内核完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM