【问题标题】:Iphone Restarts after relaunching the app from background从后台重新启动应用程序后 Iphone 重新启动
【发布时间】:2014-09-14 03:00:54
【问题描述】:

我将 ios 应用程序从后台重新启动到前台 - 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

完全是什么导致了这个问题,还请建议我如何调试这个问题..

【问题讨论】:

  • 我在控制台输出中看到这个 - 响应 backboardd 的终止而终止
  • 我可能弄错了,但我相信 Core Animation 要求您在主线程上运行,而线程 5 显然不是。它正在做核心动画stuff
  • 如果 Springboard 或 iOS 本身正在重新启动,那么肯定是 iOS 本身存在错误,这应该与 Apple 一起记录。 (当然,您的代码中也可能存在一个错误。)

标签: ios objective-c iphone core-data ios7


【解决方案1】:

由于以下任一原因,您的应用会被 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;
}

【讨论】:

    【解决方案2】:

    你使用OpenGL吗?或某种适用于相机的框架。 禁止在后台渲染表面。

    尝试处理背景/前景状态更改以暂停/恢复渲染。

    您可以为此使用UIApplicationDidEnterBackgroundNotificationUIApplicationWillEnterForegroundNotification

    【讨论】:

    • 在我的情况下,它不完全是 OpenGL,而是 SpriteKit。但我得到了你。将尝试检查 bg 状态..
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多