BradLarson/GPUImage — pull request #1308 by achambers16 (2013-11-19 23:44:41+00:00)
Title: Fix exc-bad-access if GPUImageRawDataOutput is initialized during render

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

Reason:
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.

Solution:
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