Problem is, I want to modify the transform matrix based on user input. As I couldn't find any way to modify TransformFilter matrix after it's created, I'm destroying it and recreating it with the new matrix.
It's working fine on emulator, but when running on device, it always crash after a few edits. Sometimes it crashes due OutOfMemory error, and sometimes it crashes with:
08-26 15:56:13.173 4312-4327/? E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 270
java.lang.ArrayIndexOutOfBoundsException: length=1; index=-2
at project.android.imageprocessing.filter.MultiInputFilter.newTextureReady(MultiInputFilter.java:87)
at project.android.imageprocessing.input.GLTextureOutputRenderer.drawFrame(GLTextureOutputRenderer.java:88)
at project.android.imageprocessing.input.ImageResourceInput.drawFrame(ImageResourceInput.java:67)
at project.android.imageprocessing.GLRenderer.onDrawFrame(GLRenderer.java:232)
at project.android.imageprocessing.FastImageProcessingPipeline.onDrawFrame(FastImageProcessingPipeline.java:91)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1463)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1217)
And here are the methods I'm calling to remove the transform, and then reinstall it:
So, I'm testing a very basic setup:
Problem is, I want to modify the transform matrix based on user input. As I couldn't find any way to modify TransformFilter matrix after it's created, I'm destroying it and recreating it with the new matrix.
It's working fine on emulator, but when running on device, it always crash after a few edits. Sometimes it crashes due OutOfMemory error, and sometimes it crashes with:
And here are the methods I'm calling to remove the transform, and then reinstall it: