Android的RenderScript FinalizerWatchdogDaemon致命异常 [英] Android RenderScript FinalizerWatchdogDaemon Fatal Exception
问题描述
我用RenderScript在我的应用程序做一些图像处理任务。
I use RenderScript in my app to do several image processing tasks.
有时候,我随机得到以下异常:
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)
我所有的RenderScript通话是通过信号量封闭的,以prevent,同样的脚本运行并行。
谁能告诉我这是什么消息意味着,我怎么能prevent呢?
All my RenderScript-Calls are enclosed by a Semaphore to prevent that the same script is running parallel. Can anybody tell me what this message means and how I can prevent it?
推荐答案
你有一个很长的运行的内核?
Do you have a very long running kernel?
这线程试图清理对象RS当GC消除了Java code参考。如果有一个很长的运行的内核可能被阻止足够长的时间来触发你所看到的。我们不会让任何物体通过外螺纹的内核运行时进行修改,因此,实际上外部线程被阻塞,直到内核完成。
This thread is attempting to cleanup RS objects when the GC removes the java code reference. 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.
这篇关于Android的RenderScript FinalizerWatchdogDaemon致命异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!