We are developing a SpriteKit iOS7 game,the game works very well, but the game crashes when it is sent to background if we integrated any of the following libs: - Airship. - Bugsense. - Apptentive.
Here is the Crashlytics crash report:
Thread : Crashed: com.apple.spritekit.renderQueue
0 libGPUSupportMercury.dylib 0x3478b8f6 gpus_ReturnNotPermittedKillClient
1 libGPUSupportMercury.dylib 0x3478c391 gpusSubmitDataBuffers
2 IMGSGX543GLDriver 0x2ec9982d SubmitPackets
3 GLEngine 0x320fbc3d gliPresentViewES + 172
4 OpenGLES 0x32106139 -[EAGLContext presentRenderbuffer:] + 64
5 SpriteKit 0x325701b1 -[SKView _renderContent] + 1216
6 libdispatch.dylib 0x3a6fdd07 _dispatch_client_callout + 22
7 libdispatch.dylib 0x3a703b9f _dispatch_barrier_sync_f_invoke + 26
8 SpriteKit 0x3256fcc3 -[SKView renderContent] + 82
9 SpriteKit 0x3256d663 __29-[SKView setUpRenderCallback]_block_invoke + 130
10 SpriteKit 0x3258fddb -[SKDisplayLink _callbackForNextFrame:] + 254
11 QuartzCore 0x3234f9cf CA::Display::DisplayLinkItem::dispatch() + 98
12 QuartzCore 0x3234f779 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 344
13 IOMobileFramebuffer 0x34f4576d IOMobileFramebufferVsyncNotifyFunc + 104
14 IOKit 0x30be7a75 IODispatchCalloutFromCFMessage + 248
15 CoreFoundation 0x2fec5e21 __CFMachPortPerform + 136
16 CoreFoundation 0x2fed09df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
17 CoreFoundation 0x2fed097b __CFRunLoopDoSource1 + 346
18 CoreFoundation 0x2fecf14f __CFRunLoopRun + 1398
19 CoreFoundation 0x2fe39c27 CFRunLoopRunSpecific + 522
20 CoreFoundation 0x2fe39a0b CFRunLoopRunInMode + 106
21 GraphicsServices 0x34b29283 GSEventRunModal + 138
22 UIKit 0x326dd049 UIApplicationMain + 1136
23 SplishyFish 0x000a95d1 main (main.m:16)
Apptentive, at least, doesn't make any OpenGL calls. I suspect that adding the libraries to your app may just be exposing the issue that would happen in some other context (such as when there are pending events to process on the main run loop when the app is being backgrounded).
That said, the backtrace above is the same as the one in this thread:
Spritekit crashes when entering background
of which there is a solution proposed here:
Sprite Kit & playing sound leads to app termination
The problem there being audio playing while the app is being backgrounded. Might that be the issue?
If not, the other possible culprit would be OpenGL rendering, as others have said.