Andreas Mank wrote:
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:
CCDirector::sharedDirector()->stopAnimation(); // Add this line here.
CCDirector::sharedDirector()->startAnimation();// Add this line here.
It’s solved my problem, and I hope it can work on yours, too.