Fix exc-bad-access if GPUImageRawDataOutput is initialized during render #1308

merged 1 commit into from Dec 9, 2013


None yet
2 participants

achambers16 commented Nov 19, 2013

If GPUImageRawDataOutput is initialized while the image pipeline is busy rendering other data, an exc-bad-access will occur.

GPUImageRawDataOutput can set itself as the active shader program on a queue other than the image processing queue. I noticed your "REFACTOR" note regarding moving this to a block on the image processing queue.

Don't set GPUImageRawDataOutput as the active shader program during initialization. And wait to enable the vertex attribute arrays until we actually start rendering data.

I have a unit test that can reproduce this crash very consistently. I can include that unit test as part of this pull request.

GPUImageMovieWriter likely has the same problem. I see that you have a note about refactoring that code as well. See framework/Source/iOS/GPUImageMovieWriter.m and framework/Source/Mac/GPUImageMovieWriter.m

@BradLarson BradLarson added a commit that referenced this pull request Dec 9, 2013

@BradLarson BradLarson Merge pull request #1308 from achambers16/fix-RawDataOutput-bad-access
Fix exc-bad-access if GPUImageRawDataOutput is initialized during render

@BradLarson BradLarson merged commit 0862252 into BradLarson:master Dec 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment