1

I am working on GPUImage framework , to record video using GPUImageVideoCamera .

it used to work sometime very flawlessly, but sometimes i go back and forth from my cameraScreen, it does crash sometime . I donot what is happening . I am Using ARC and IOS 6.

I am adding images of my error please have a look .

This is first one

enter image description here

The crash happens in the GpuImageVideoCamera dealloc method when releasing the frameRenderingSemaphore:

// ARC forbids explicit message send of 'release'; since iOS 6 even for dispatch_release() calls: stripping it out in that case is required.
#if ( (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0) || (!defined(__IPHONE_6_0)) )    
    if (frameRenderingSemaphore != NULL)
    {
        dispatch_release(frameRenderingSemaphore);
    }
#endif
Johannes Rudolph
  • 35,298
  • 14
  • 114
  • 172
kshitij godara
  • 1,523
  • 18
  • 30
  • I've just hit the same issue, I'm including the code as text for others to find it when googling/searching. I'll let you know when I find a solution. – Johannes Rudolph Apr 03 '14 at 11:33

2 Answers2

3

It appears that this is not an issue with ARC/not ARC (I've tried GPUImage builds with and without ARC enabled).

What I have found instead is that before releasing the GPUImageVideoCamera, you need to stop it from capturing any frames. Then schedule the call to [camera release] on the GPUImageContext.contextQueue, which will make sure the release is called after all frames have been processed.

Sorry for not posting more sample code, right now using GPUImage from Xamarin/C# hence translations a bit cumbersome.

Johannes Rudolph
  • 35,298
  • 14
  • 114
  • 172
-1

Try to remove all breakpoints in project, and do product --> clean

mas'an
  • 170
  • 6
  • This won't help, EXC_BREAKPOINT has nothing to do with what ends up in the built product, see http://stackoverflow.com/questions/2611607/are-exc-breakpoint-sigtrap-exceptions-caused-by-debugging-breakpoints – Johannes Rudolph Apr 03 '14 at 11:36