AGXGLDriver crash

From Crashlytics i am getting this kind of crashes

  • gldUpdateDispatch

its only happening in ios. There is no problem for android

i could not figure out what casing this crashes

From Crashlytics i got this suggestion

Based on the stack trace displayed here, it looks like new calls triggering OpenGL rendering took place while the app was transitioning to, or from, a background state. If you set up OpenGL drawing in your app delegate's methods, make sure that you only did so in applicationDidBecomeActive:, never in application:willFinishLaunchingWithOptions: or application:didFinishLaunchingWithOptions:. According to some reports, even displaying an FPS indicator for SpriteKit could cause rendering to occur before it is allowed.

But current cocos2dx system how this is possible?

Please Help me

I have never seen this before.

Have you seen this? https://developer.apple.com/library/archive/qa/qa1766/_index.html

  1. Do u use cocos commands in applicationDidEnterBackground?

  2. Do you have banner ads?

  3. Do you show intertstitial/rewarded ads?

  1. In applicationDidEnterBackground code is like below
    {
        Director::getInstance()->stopAnimation();	
    	SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
        SimpleAudioEngine::getInstance()->pauseAllEffects();
    	string timestamp = StringUtils::toString((int)std::time(nullptr));
        int current_time = std::stoi(timestamp);
    	UserDefault::getInstance()->setIntegerForKey(Key, current_time);
}
  1. No banner ads
  2. yes show both intertstitial/rewarded ads

I am stuck here.

If any body has the solution please share it.

Thanks in advance

Check if the crashes are happening when an interstitial/rewarded video is on screen when user sends your app to background and resumes later. Many of these ads are playable and might use WebGl etc.