0

I need some help with this crash log. I've seen other posts about this error having to do with the watchdog timing out but I have not been able to figure this out.

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
TylerH
  • 20,799
  • 66
  • 75
  • 101
kevnm67
  • 177
  • 3
  • 11
  • Are you importing/including the correct frameworks for you projects, and where you're using them? `#import ` or CoreData etc. – Sti May 11 '13 at 14:20
  • I am pretty sure im importing the right frameworks. Wouldnt I receive an error if I didnt? Also, what's weird is I do not receive this error when I run the app but Apple rejected it 2 times for the crash in my post. I had someone add iCloud, which wont load and using the local store instead. Not sure if that has something to do with it. – kevnm67 May 11 '13 at 14:24
  • 1
    Have a look at the answer to http://stackoverflow.com/questions/773442/what-does-8badf00d-mean and the linked Apple documentation. – Martin R May 11 '13 at 14:38
  • Thanks Martin, I did look at that thread and the documentation referenced but, I dont have any synchronous calls. Would launching testflight in the didfinishlaunching cause it? ...although I use it in 2 other apps and have not had any issues. This is the only other code I have in didFinishLaunching: NSURL *ubiq = [[NSFileManager defaultManager]URLForUbiquityContainerIdentifier:nil]; if (ubiq) { NSLog(@"iCloud access at %@", ubiq); // TODO: Load document
    } else { NSLog(@"No iCloud access"); }
    – kevnm67 May 11 '13 at 14:57
  • @user1856829: Well, there must be something on the main thread that takes too long. I have no testflight and almost no iCloud experience, so I can only recommend to NSLog timestamps to find the culprit. There was also some WWDC session that demonstrated how to debug this kind of problems with Instruments. – Martin R May 11 '13 at 15:08
  • Thanks for the suggestion, Martin. Ill check the developer resources for the video. – kevnm67 May 11 '13 at 16:09

1 Answers1

4

Ate Bad Food (0x8badf00d) is when the Watch Dog kills your app because its taking too long to launch. Your application:didFinishLaunchingWithOptions: method must complete in less then 5 second or the Watch Dog will bite you. Note: when you run in the debugger the watch dog is disabled. You must test a release build on a device before submitting to the App Store. To fix this error you need to run you App on a device in Instruments using a Time Profiler.

You should to watch WWDC 2012 Session 225 Up and Running - Making a great impression with every launch. It demos exactly how to fix this error. https://developer.apple.com/videos/wwdc/2012/?id=225

GayleDDS
  • 4,443
  • 22
  • 23
  • I'd vote you up but I currently can't :( Thanks for the detailed info, I really appreciate it! The only thing that would cause this is the NSURL *ubiq iCloud code but it was not my work and im not sure where to move it. Ive never worked with iCloud before. How can I fix that? (im a beginner by the way). – kevnm67 May 13 '13 at 17:36
  • 1
    The NSURL is most likely your problem you should not be making network calls on you main thread. I've not done any iCloud work, but there are three kinds of iCloud, Key value store, documents and core data, which are you using. The Stanford iOS Class 2011-2012 has a sample iCloud app http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/sample_code/Photomania%20iCloud.zip **FYI**: Stanford did not cover iClould this year, I think thats a hint. – GayleDDS May 13 '13 at 18:48
  • sorry for the delayed response, I just saw this. Im using core data. Thanks for the link, I will check it out. – kevnm67 Jun 03 '13 at 21:17