GPUImage2 icon indicating copy to clipboard operation
GPUImage2 copied to clipboard

CircleGenerator EXC_BAD_ACCESS when renderCircleOfRadius called

Open kevinvanmierlo opened this issue 5 years ago • 2 comments

We're trying to use the CircleGenerator as a mask, but when resizing it (calling the method renderCircleOfRadius again) it produces a crash. So I've tried to take the CircleGenerator out of the mask and added it to a NormalBlend, but it still crashes when resizing it. It crashes at multiple locations, but usually it crashes at clearFramebufferWithColor in OpenGLRendering which is called in CircleGenerator. Specifically it crashes at glClear(GLenum(GL_COLOR_BUFFER_BIT)). I've tried to make it as simple as possible. So as of right now it is the videoCamera to a crop filter, to a normalBlend, to a filterview. And the circleGenerator adds the normalblend as a target. When a slider is updated it calls the renderCircleOfRadius method. It doesn't always immediately crashes. But should crash pretty quick after sliding it. For example it just crashed when the radius was changed from 0.25 to around 0.20.

Do you have any idea what's causing this and how to fix it?

kevinvanmierlo avatar Nov 20 '18 16:11 kevinvanmierlo

Take a look at https://github.com/BradLarson/GPUImage2/pull/243 which may help

joshbernfeld avatar Nov 27 '18 17:11 joshbernfeld

@joshbernfeld This could be a fix. You fixed a lot of crashes! Do you have any idea when this will be merged?

kevinvanmierlo avatar Nov 28 '18 08:11 kevinvanmierlo