我将ios应用程序从bacground重新启动到前台 - iphone重新启动并说backbaordd崩溃 请查找以下崩溃日志以供参考
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000001
Triggered by Thread: 5
Thread 0:
0 libsystem_kernel.dylib 0x0000000192a7dca0 mach_msg_trap + 8
1 CoreFoundation 0x0000000185e5ed20 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x0000000185e5cf14 __CFRunLoopRun + 932
3 CoreFoundation 0x0000000185d9ddcc CFRunLoopRunSpecific + 448
4 backboardd 0x00000001000e7a60 0x1000e0000 + 31328
5 libdyld.dylib 0x000000019299ba9c start + 0
Thread 1:
0 libsystem_kernel.dylib 0x0000000192a7daa8 kevent64 + 8
1 libdispatch.dylib 0x0000000192981998 _dispatch_mgr_thread + 48
Thread 2 name: com.apple.CoreAnimation.render-server
Thread 2:
0 libsystem_kernel.dylib 0x0000000192a7dca0 mach_msg_trap + 8
1 QuartzCore 0x0000000188b02a18 CA::Render::Server::server_thread(void*) + 236
2 QuartzCore 0x0000000188b9422c thread_fun + 24
3 libsystem_pthread.dylib 0x0000000192b17e18 _pthread_body + 164
4 libsystem_pthread.dylib 0x0000000192b17d70 _pthread_start + 136
5 libsystem_pthread.dylib 0x0000000192b15550 thread_start + 0
Thread 3:
0 libsystem_kernel.dylib 0x0000000192a7dca0 mach_msg_trap + 8
1 CoreFoundation 0x0000000185e5ed20 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x0000000185e5ceb0 __CFRunLoopRun + 832
3 CoreFoundation 0x0000000185d9ddcc CFRunLoopRunSpecific + 448
4 CoreFoundation 0x0000000185df3454 CFRunLoopRun + 108
5 IOMobileFramebuffer 0x000000018bf3e484 iomfb_runloop_thread + 312
6 libsystem_pthread.dylib 0x0000000192b17e18 _pthread_body + 164
7 libsystem_pthread.dylib 0x0000000192b17d70 _pthread_start + 136
8 libsystem_pthread.dylib 0x0000000192b15550 thread_start + 0
Thread 4 name: com.apple.CoreAnimation.IOMFB.wireless
Thread 4:
0 libsystem_kernel.dylib 0x0000000192a7dca0 mach_msg_trap + 8
1 CoreFoundation 0x0000000185e5ed20 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x0000000185e5ceb0 __CFRunLoopRun + 832
3 CoreFoundation 0x0000000185d9ddcc CFRunLoopRunSpecific + 448
4 CoreFoundation 0x0000000185df3454 CFRunLoopRun + 108
5 QuartzCore 0x0000000188b58a20 CA::WindowServer::IOMFBServer::thread_body(void*) + 344
6 QuartzCore 0x0000000188b9422c thread_fun + 24
7 libsystem_pthread.dylib 0x0000000192b17e18 _pthread_body + 164
8 libsystem_pthread.dylib 0x0000000192b17d70 _pthread_start + 136
9 libsystem_pthread.dylib 0x0000000192b15550 thread_start + 0
Thread 5 name: com.apple.CoreAnimation.IOMFB.primary
Thread 5 Crashed:
0 libGPUSupportMercury.dylib 0x000000018b658694 gpus_ReturnContextErrorKillClient + 12
1 AGXGLDriver 0x0000000184a77248 SubmitPackets + 196
2 AGXGLDriver 0x0000000184a6c3a0 glrSetPrivateInteger + 284
3 GLEngine 0x000000018870427c gliSetInteger + 4592
4 OpenGLES 0x00000001887f11e8 -[EAGLContext swapNotification:forTransaction:onLayer:] + 152
5 QuartzCore 0x0000000188b562c0 CA::WindowServer::IOMFBDisplay::finish_update(CA::Render::Update*, unsigned int) + 1348
6 QuartzCore 0x0000000188b5c0a8 CA::WindowServer::Server::render_for_time(double, CVTimeStamp const*) + 1536
7 QuartzCore 0x0000000188b58bf4 CA::WindowServer::IOMFBServer::vsync_callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 220
8 IOKit 0x0000000186d9fe70 IODispatchCalloutFromCFMessage + 360
9 CoreFoundation 0x0000000185e50a8c __CFMachPortPerform + 188
10 CoreFoundation 0x0000000185e5f03c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
11 CoreFoundation 0x0000000185e5ef9c __CFRunLoopDoSource1 + 440
12 CoreFoundation 0x0000000185e5d1c0 __CFRunLoopRun + 1616
13 CoreFoundation 0x0000000185d9ddcc CFRunLoopRunSpecific + 448
14 CoreFoundation 0x0000000185df3454 CFRunLoopRun + 108
15 QuartzCore 0x0000000188b58a20 CA::WindowServer::IOMFBServer::thread_body(void*) + 344
16 QuartzCore 0x0000000188b9422c thread_fun + 24
17 libsystem_pthread.dylib 0x0000000192b17e18 _pthread_body + 164
18 libsystem_pthread.dylib 0x0000000192b17d70 _pthread_start + 136
19 libsystem_pthread.dylib 0x0000000192b15550 thread_start + 0
Thread 6 name: IOHIDService - RunLoopCompatibilityThread
Thread 6:
0 libsystem_kernel.dylib 0x0000000192a7dca0 mach_msg_trap + 8
1 CoreFoundation 0x0000000185e5ed20 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x0000000185e5ceb0 __CFRunLoopRun + 832
3 CoreFoundation 0x0000000185d9ddcc CFRunLoopRunSpecific + 448
4 CoreFoundation 0x0000000185df3454 CFRunLoopRun + 108
5 IOKit 0x0000000186dc23bc __IOHIDServiceRunLoopCompatibilityThread + 184
6 libsystem_pthread.dylib 0x0000000192b17e18 _pthread_body + 164
7 libsystem_pthread.dylib 0x0000000192b17d70 _pthread_start + 136
8 libsystem_pthread.dylib 0x0000000192b15550 thread_start + 0
完全是导致此问题的原因,并且还建议我如何调试此问题..
答案 0 :(得分:3)
您的应用因以下任何原因而被ios终止,
尝试在辞退应用程序时暂停动画内容,并在用户返回应用程序时恢复它们。像这样的东西,
- (void)applicationWillResignActive:(UIApplication *)application
{
// pause sprite kit
SKView *view = (SKView *)self.window.rootViewController.view;
view.paused = YES;
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// resume sprite kit
SKView *view = (SKView *)self.window.rootViewController.view;
view.paused = NO;
}
答案 1 :(得分:1)
您使用OpenGL
吗?或者某种与相机一起使用的框架。
在背景中禁止渲染曲面。
尝试处理后台/前景状态更改以暂停/恢复渲染。
您可以为此使用UIApplicationDidEnterBackgroundNotification
和UIApplicationWillEnterForegroundNotification
。