Crash in gpus_ReturnNotPermittedKillClient when moving to background


My app uses iOS background services and performs some actions when moved to the background. I use Shinobi to display an animated graph which I refresh every second. Apps shouldn’t call any opengl functions in the background so I stop the graph redraws in applicationDidEnterBackground: - still the app crashes sometimes when moving to the background (very rarely, I cannot reproduce by myself, just see it in user’s stacktraces).

I found the following Apple page with the description of the problem:

and the following two solutions:

Now the question is - should I call glFinish() as Apple suggests or [[CCDirector sharedDirector] stopAnimation] as suggested in the StackOverflow post? As I don’t know what you do in the Shinobi code, I don’t know what the proper solution to this problem is. Thanks.

Crash in SChartGL::GLResources::glGen()


Thanks for raising this issue, I hope your development with Shinobi is going well.  We’re using our own OpenGL code to do the rendering rather than using Cocos2D, so I would recommend calling glFinish.

I hope that fixes the issue for you, let me know how things go!




Ah, sorry, haven’t checked myself and thought that CCDirector is part of iOS API. Thanks!



I’m having the same intermittent crash even though I make sure not to redraw the chart while my app is in the background. Did calling glFinish yourself seem to fix the problem?

If so, shouldn’t this call be performed by the Shibobi library itself?



No, unfortunately I’m still seeing these crashes in the logs - I also think it should be fixed inside Shinobi.


Hey Guys,

I’ve raised this as a task to investigate. Someone will post back here with any progress we make!

Jan Akerman


Any update on fixing this within Shinobi? We’re encountering the problem. I’ll try the suggestions above for handling backgrounding.