title: Google Analytics SDK for iOS Crash
body: <p>I get the following crash (0x8badf00d) because of something to do with Google Analytics SDK 1.1. What's also strange is that iOS killed it in just 1 second?</p>
  
  <p>I initialize the tracker like this:</p>
  
  <pre><code>[[GANTracker sharedTracker] startTrackerWithAccountID:kGANWebPropertyID dispatchPeriod:kGANDispatchPeriodSec delegate:self];
  </code></pre>
  
  <p>Here is the crash log</p>
  
  <pre><code>Incident Identifier: 5459E916-5306-408A-A630-F405DFD97711
  CrashReporter Key:   20ac546c31144c5f86de428ce3332012ab604d49
  Hardware Model:      iPhone3,1
  Process:         XXXX [63]
  Path:            /var/mobile/Applications/2AADFD36-5C6F-4EEC-B740-0DE77C6FE2A9/XXXX.app/XXXX
  Identifier:      XXXX
  Version:         ??? (???)
  Code Type:       ARM (Native)
  Parent Process:  launchd [1]
  
  Date/Time:       2011-07-04 17:23:33.464 +0200
  OS Version:      iPhone OS 4.3.3 (8J2)
  Report Version:  104
  
  Exception Type:  00000020
  Exception Codes: 0x8badf00d
  Highlighted Thread:  0
  
  Application Specific Information:
  XXXX failed to resume in time
  
  Elapsed total CPU time (seconds): 1.060 (user 0.480, system 0.580), 11% CPU 
  Elapsed application CPU time (seconds): 0.050, 0% CPU
  
  Thread 0 name:  Dispatch queue: com.apple.main-thread
  Thread 0:
  0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
  1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
  2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
  3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
  4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
  5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
  6   CFNetwork                       0x34cb6b66 SocketStream::read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*) + 274
  7   CFNetwork                       0x34cb6a46 virtual thunk to SocketStream::read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*) + 30
  8   CFNetwork                       0x34cb7a5c ReadStreamCallbacks::_read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*, void*) + 40
  9   CoreFoundation                  0x308ffcf4 CFReadStreamRead + 268
  10  XXXX                            0x000d2992 -[GANTCPSocket read:length:] (GANTCPSocket.m:99)
  11  XXXX                            0x000d703c -[GANDataDispatcher socketBecameReadable:] (GANDataDispatcher.m:413)
  12  XXXX                            0x000d2936 ReadStreamCallBack (GANTCPSocket.m:44)
  13  CoreFoundation                  0x308ffa1a _signalEventSync + 70
  14  CoreFoundation                  0x308ff9b6 _cfstream_solo_signalEventSync + 58
  15  CoreFoundation                  0x308ff8aa _CFStreamSignalEvent + 326
  16  CoreFoundation                  0x308ff75c CFReadStreamSignalEvent + 4
  17  CFNetwork                       0x34cb4c14 SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 20
  18  CFNetwork                       0x34c423f4 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 104
  19  CFNetwork                       0x34c42376 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 42
  20  CoreFoundation                  0x3095c48a __CFSocketDoCallback + 334
  21  CoreFoundation                  0x3095d4a2 __CFSocketPerformV0 + 78
  22  CoreFoundation                  0x30957a72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
  23  CoreFoundation                  0x3095969c __CFRunLoopDoSources0 + 188
  24  CoreFoundation                  0x3095a4e4 __CFRunLoopRun + 224
  25  CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
  26  CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
  27  GraphicsServices                0x30269418 GSEventRunModal + 108
  28  GraphicsServices                0x302694c4 GSEventRun + 56
  29  UIKit                           0x30a10d62 -[UIApplication _run] + 398
  30  UIKit                           0x30a0e800 UIApplicationMain + 664
  31  XXXX                            0x000026b2 main (main.m:22)
  32  XXXX                            0x00002594 0x1000 + 5524
  
  Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
  Thread 1:
      0   libsystem_kernel.dylib          0x35590fbc kevent + 24
      1   libdispatch.dylib               0x35261032 _dispatch_mgr_invoke + 706
      2   libdispatch.dylib               0x3526203a _dispatch_queue_invoke + 86
      3   libdispatch.dylib               0x352615ea _dispatch_worker_thread2 + 186
      4   libsystem_c.dylib               0x3566758a _pthread_wqthread + 258
      5   libsystem_c.dylib               0x35667bbc start_wqthread + 0
  
      Thread 2 name:  WebThread
      Thread 2:
      0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
      1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
  2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
  3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
  4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
  5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
  6   WebCore                         0x35f5327e RunWebThread(void*) + 382
  7   libsystem_c.dylib               0x3566630a _pthread_start + 242
  8   libsystem_c.dylib               0x35667bb4 thread_start + 0
  
  Thread 3:
  0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
  1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
  2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
  3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
  4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
  5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
  6   Foundation                      0x341dd7f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
  7   Foundation                      0x341d0382 -[NSThread main] + 38
  8   Foundation                      0x342425c6 __NSThread__main__ + 966
  9   libsystem_c.dylib               0x3566630a _pthread_start + 242
  10  libsystem_c.dylib               0x35667bb4 thread_start + 0
  
  Thread 4 name:  com.apple.CFSocket.private
  Thread 4:
  0   libsystem_kernel.dylib          0x3558fc60 __select + 20
  1   CoreFoundation                  0x3095d8f2 __CFSocketManager + 582
  2   libsystem_c.dylib               0x3566630a _pthread_start + 242
  3   libsystem_c.dylib               0x35667bb4 thread_start + 0
  
  Thread 5:
  0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
  1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
  2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
  3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
  4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
  5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
  6   MapKit                          0x33976456 TileCachePrivate::runCacheThread() + 274
  7   MapKit                          0x3397633a _runCacheThread(void*) + 2
  8   libsystem_c.dylib               0x3566630a _pthread_start + 242
  9   libsystem_c.dylib               0x35667bb4 thread_start + 0
  
  Thread 6 name:  CADispatch worker
  Thread 6:
  0   libsystem_kernel.dylib          0x3558fd18 __semwait_signal + 24
  1   libsystem_c.dylib               0x3568d860 _pthread_cond_wait + 756
  2   libsystem_c.dylib               0x35634eb2 pthread_cond_wait + 26
  3   QuartzCore                      0x34421730 CA::DispatchGroup::thread(void*) + 84
  4   QuartzCore                      0x3443b836 thread_fun + 10
  5   libsystem_c.dylib               0x3566630a _pthread_start + 242
  6   libsystem_c.dylib               0x35667bb4 thread_start + 0
  
  Thread 7:
  0   libsystem_kernel.dylib          0x3558dc00 mach_msg_trap + 20
  1   libsystem_kernel.dylib          0x3558d758 mach_msg + 44
  2   CoreFoundation                  0x309582b8 __CFRunLoopServiceMachPort + 88
  3   CoreFoundation                  0x3095a562 __CFRunLoopRun + 350
  4   CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
  5   CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
  6   MapKit                          0x3398120e +[NSThread(MKAdditions) _mapkit_runThread:] + 334
  7   Foundation                      0x341d0382 -[NSThread main] + 38
  8   Foundation                      0x342425c6 __NSThread__main__ + 966
  9   libsystem_c.dylib               0x3566630a _pthread_start + 242
  10  libsystem_c.dylib               0x35667bb4 thread_start + 0
  
  Thread 8:
  0   libsystem_kernel.dylib          0x355903ec __workq_kernreturn + 8
  1   libsystem_c.dylib               0x356676d8 _pthread_wqthread + 592
  2   libsystem_c.dylib               0x35667bbc start_wqthread + 0
  
  Thread 9:
  0   libsystem_kernel.dylib          0x355903ec __workq_kernreturn + 8
  1   libsystem_c.dylib               0x356676d8 _pthread_wqthread + 592
  2   libsystem_c.dylib               0x35667bbc start_wqthread + 0
  
  Unknown thread crashed with unknown flavor: 5, state_count: 1
  </code></pre>