Android RenderScript FinalizerWatchdogDaemon Fatal Exception

I use RenderScript in my application to perform several image processing tasks.

Sometimes I accidentally 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 in a Semaphore to prevent parallel execution of the same script. Can someone tell me what this message means and how can I prevent it?

+3
source share
1 answer

Do you have a very long core?

This thread tries to clear RS objects when the GC removes the reference to Java code. If there is a very long running kernel, it can be locked long enough to trigger what you see. We do not allow objects to change the external thread while the kernel is running, therefore, in essence, the external thread is blocked until the kernel terminates.

+2
source

All Articles