2.1.4 Swapbuffers crash (IOS 6.1.3)

Hi,
since i updated my game from cocos2dx 2.0.4 to 2.1.4 i receive random crashes after a random period of time (on my IPad/ IOS). The location is always the same “eaglview::swapbuffers”. This crash only appears with IOS 6.1.3. . 6.1 and 6.1.2 work without crash.

I read some posts but i did not found a solution or a good hint how to find and fix the problem.

It would be great to get any kind of information related to this problem.

No idea … anyone?

Maybe someone knows how to debug/find this issue?

I solved this problem by disabling GL_EXT_discard_framebuffer extension in CCConfiguration for IOS using

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
m_bSupportsDiscardFramebuffer = false;
#else
m_bSupportsDiscardFramebuffer = checkForGLExtension(“GL_EXT_discard_framebuffer”);
#endif

This do not solve the problem for my game. it only appear less often.

Andreas Mank wrote:

Hi,
since i updated my game from cocos2dx 2.0.4 to 2.1.4 i receive random crashes after a random period of time (on my IPad/ IOS). The location is always the same “eaglview::swapbuffers”. This crash only appears with IOS 6.1.3. . 6.1 and 6.1.2 work without crash.
>
I read some posts but i did not found a solution or a good hint how to find and fix the problem.
>
It would be great to get any kind of information related to this problem.

Hi, I’m using cocos2d-2.0-x-2.0.4, and I got the same problem that my game always crashed in “swapBuffers”
when it did enter background on iOS 6.1.2 (iPhone5) and 6.1.3 (iPad), but not on iOS 5.0.1 (iPhone4).

Then I found that after “did enter background”, the CCDirector shouldn’t have drawSence anymore.
To solve this problem, please try to add these code:

void AppDelegate::applicationDidEnterBackground(){

CCDirector::sharedDirector()->stopAnimation(); // Add this line here.
}

void AppDelegate::applicationWillEnterForeground()
{
CCDirector::sharedDirector()->startAnimation();// Add this line here.

}

It’s solved my problem, and I hope it can work on yours, too.

I still have the problem - and it is not related to entering the background.

Does anyone know how i can debug the error? If I step into the swap buffers funtion I only get some assember-a-like code? Do I need any debugging information?

Does anybody has experience with errors which are related to a specific device? On my iPad mini, 1, 2 and windows my app is not crashing. Could it be a driver problem? Can apple support me to solve the problem?

I really frustrated and this I blocking my release. I could/would share my could if anybody would help me to debug this.