Doing some investigation online, I've noticed that gpus_ReturnNotPermittedKillClient
gets thrown when OpenGL actions are triggered while an app is backgrounded. I'm currently working on a project that involves a map view and an overlay (using Apple's Breadcrumb sample code). These actions are performed on the main thread, but there's a possibility that the app could get backgrounded as the map view becomes initialized or the view gets pushed onto the screen.
I also use location services to retrieve points through GPS, but I don't update the overlay unless we're in the foreground.
Is it to my understanding that since iOS 6, MKMapView's are now created with OpenGL? If this is the case, then could drawing the overlay also be through OpenGL? This could help explain why I've been getting this error randomly.
I've heard of some ways to cancel all OpenGL actions, such as invoking glFinish()
in applicationDidEnterBackground
and applicationWillResignActive
or using [[CCDirector sharedDirector] pause]
. Considering this, what would be the best solution to eliminate any OpenGL drawing with an MKMapView/MKOverlayView?