Vyacheslav
Vyacheslav

Reputation: 27211

EXC_BAD_ACCESS at lauch for EAGLContext renderbufferStorage: fromDrawable: in Cocos2d app whie debugging

Using default cocos2d-swift app I'm receiving the error EXC_BAD_ACCESS on my iPad Mini 2 at the line:

BOOL rb_status = [_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];

But if I try to launch the app without debug all works fine. If I use debug on any virtual device I receive no error too. Why it doesn't work? How to remove this error?

Upvotes: 18

Views: 4630

Answers (2)

Kevin Heap
Kevin Heap

Reputation: 683

Looks like this is an issue on certain devices on iOS 8.3+. It works for me on almost all devices but the iPad mini 2 fails for me as well. The short of it is that there's nothing wrong with the call itself. Seems to be an Xcode bug with those devices for some reason. You can get around it (until Apple fixes it) by:

In Xcode, go to Product -> Scheme -> Edit Scheme ... And for the Run Debug configuration (on left side) choose "Options" (on right side) and configure "GPU Frame Capture" as Disabled.

For more information, check out this thread: https://github.com/BradLarson/GPUImage/issues/2022#issuecomment-118943746

Upvotes: 50

Vyacheslav
Vyacheslav

Reputation: 27211

I found the device hadn't got the last iOS version. When I updated the iOS version of the devices the error has removed.

Upvotes: 1

Related Questions