苹果解读:
http://developer.apple.com/library/ios/#qa/qa1766/_index.html
转自:http://www.eoeandroid.com/thread-251598-1-1.html
libGPUSupportMercury.dylib`gpus_ReturnNotPermittedKillClient:
0x372fa094: trap
0x372fa096: nop
原因在于 AppDelegate.cpp里 :
void AppDelegate::applicationDidEnterBackground(){CCDirector::sharedDirector()->pause();}
void AppDelegate::applicationWillEnterForeground(){CCDirector::sharedDirector()->resume();}
director在app切换至后台时若被pause,它其实并没有真正暂停,而是仍保持着每秒4帧的绘制速率。但在app处于后台时,ios是不允许app调opengl的。这个原因引发了上述问题。
解决方法是:
void AppDelegate::applicationDidEnterBackground()
{CCDirector::sharedDirector()->stopAnimation();
}
void AppDelegate::applicationWillEnterForeground()
{CCDirector::sharedDirector()->startAnimation();
}
stopAnimation()才让director真正暂停下来。
另:播放视频时按home键crash问题:
http://blog.k-res.net/archives/1193.html