Wednesday, December 12, 2012

[android-developers] How to tidy up a Surface and SurfaceTexture when used with RenderScript

I am using an android.view.Surface, an android.graphics.SurfaceTexture and the setSurface method of an Allocation to receive the results from some RenderScript and then use those results as a texture within OpenGL ES. The texture does successfully get updated with the RenderScript results. However when I attempt to tidy up and destroy the RenderScript context I get a Fatal signal 11 (SIGSEGV).

How do I go about tidying up the Surface, SurfaceTexture, Allocation and RenderScript context so that the crash does not occur?

This is running on a Nexus S with Android 4.1.2 and an Emulator running 4.2.

The crash occurs during rsContextDestroy.

I tried to attach an example Activity and RenderScript (sets random grey values) and the log output from a call to contextDump() just before the destroy() call on the RenderScript context but that did not seem to work. You can find them over on StackOverflow.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment