0

我需要有关此崩溃日志的帮助。我已经看到其他有关此错误的帖子与看门狗超时有关,但我无法弄清楚这一点。

Exception type: 02
exception code: 08badf00d
failed to launch in time
Elapsed total CPU time (seconds): 26.920 (user 26.920, system 0.000), 67% CPU Elapsed application CPU time (seconds): 0.850, 2% CPU

Unknown thread crashed with unknown flavor: 5, state_count: 1

MORE details:

Thread0name: Dispatchqueue:com.apple.main-thread Thread 0:  
0 libsystem_kernel.dylib 1 libsystem_c.dylib  
2 CoreData  
3 CoreData performFetch:] + 334  
4 MyPaleo  
5 UIKit  
loadViewIfRequired] + 360  
6 UIKit  
contentScrollView] + 22  
7 UIKit  
_computeAndApplyScrollContentInsetDeltaForViewController:] + 24  
8 UIKit 0x3346ef70-[UINavigationController _layoutViewController:] + 28  
9 UIKit 0x3346ee94-[UINavigationController   _updateScrollViewFromViewController:toViewController:] + 268  
10 UIKit 0x3346e5d4-[UINavigationController   _startTransition:fromViewController:toViewController:] + 60  
11 UIKit 0x3346e4bc-[UINavigationController _startDeferredTransitionIfNeeded:] + 320  
0x399950fc__psynch_mutexwait+24 0x398de124 pthread_mutex_lock + 388 0x31383e8c -[_PFLock lock] + 20 0x31465752 -[NSFetchedResultsController  
0x0001a5d2 0x2000 + 99794 0x3341a590 -[UIViewController
0x3346f146 -[UIViewController 0x3346f08c -[UINavigationController
12 UIKit  
layoutSubviews] + 176  
13 UIKit  
layoutSublayersOfLayer:] + 254  
14 QuartzCore  
15 QuartzCore  
CA::Layer::layout_if_needed(CA::Transaction*) + 456  
16 QuartzCore 0x331d77ca-[CALayerlayoutIfNeeded]+138 17 UIKit 0x334a80e4-[UIViewController window:setupWithInterfaceOrientation:] + 204  
18 UIKit 0x334a72d0-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3616  
0x3343f4e4-[UILayoutContainerView 0x333fe7fe-[UIView(CALayerDelegate)
0x331a8d86-[CALayerlayoutSublayers]+210 0x331a8924  
19 UIKit 0x334a64a2-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 42 20 UIKit 0x334a642c-[UIWindow _setRotatableViewOrientation:duration:force:] + 64  
21 UIKit 0x335dc304__57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke_0 + 100  
22 UIKit 0x3346468e-[UIWindow _updateToInterfaceOrientation:duration:force:] + 214  
23 UIKit 0x334643d0-[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 688  
24 UIKit 0x33463d36-[UIViewController _tryBecomeRootViewControllerInWindow:] + 154  
25 UIKit 0x3345aea6-[UIWindow addRootViewControllerViewIfPossible] + 366  
26 UIKit  
360  
27 UIKit  
28 UIKit  
_callInitializationDelegatesForURL:payload:suspended:] + 1662  
29 UIKit 0x33453846-[UIApplication   _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
30 UIKit  
handleEvent:withNewEvent:] + 1000
31 UIKit  
32 UIKit  
33 GraphicsServices  
34 GraphicsServices  
35 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32  
36 CoreFoundation 37 CoreFoundation 38 CoreFoundation 39 CoreFoundation 40 UIKit  
41 UIKit  
42 MyPaleo  
43 libdyld.dylib  
0x315c8112 __CFRunLoopDoSource1 + 134 0x315c6f94 __CFRunLoopRun + 1380 0x31539eb8   CFRunLoopRunSpecific + 352 0x31539d44 CFRunLoopRunInMode + 100 0x33452480 -[UIApplication _run] + 664 0x3344f2fc UIApplicationMain + 1116 0x0001eb16 0x2000 + 117526
0x398ceb1c start + 0
4

1 回答 1

4

吃了坏食物(0x8badf00d)是看门狗杀死你的应用程序,因为它启动时间太长。你的 application:didFinishLaunchingWithOptions: 方法必须在 5 秒内完成,否则 Watch Dog 会咬你。注意:当您在调试器中运行时,看门狗被禁用。在提交到 App Store 之前,您必须在设备上测试发布版本。要修复此错误,您需要使用 Time Profiler 在 Instruments 中的设备上运行您的应用程序。

您应该观看 WWDC 2012 Session 225 Up and Running - 每次发布都给人留下深刻印象。它演示了如何修复此错误。 https://developer.apple.com/videos/wwdc/2012/?id=225

于 2013-05-12T16:53:50.967 回答