title: over-release without a calltrace (using ARC), bad acces in main
body: <p>I've recently converted to using ARC. However, i'm having a weird crash now, and the crashlogs are really unhelpful. During one of my application initialization processes (getting data from server, parsing it, setting up views), i get a bad_access. This is the error log from the device:</p>
  
  <pre><code>    Incident Identifier: 7CE05452-7C5D-424A-8529-AE7B17C9FEBC
  CrashReporter Key:   b743ede30ce737293cf7444f67bb8a7b590c2fd9
  Hardware Model:      iPhone3,1
  Process:         BoreBeta [231]
  Path:            /var/mobile/Applications/52A15437-459A-4160-95C4-BF5DF5C98C15/BoreBeta.app/BoreBeta
  Identifier:      BoreBeta
  Version:         ??? (???)
  Code Type:       ARM (Native)
  Parent Process:  launchd [1]
  
  Date/Time:       2011-08-18 14:53:41.800 +0200
  OS Version:      iPhone OS 5.0 (9A5288d)
  Report Version:  104
  
  Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
  Exception Codes: KERN_INVALID_ADDRESS at 0x80000004
  Crashed Thread:  0
  
  Thread 0 name:  Dispatch queue: com.apple.main-thread
  Thread 0 Crashed:
  0   CoreFoundation                  0x3758e380 CFRelease + 28
  1   CoreFoundation                  0x375a93ec -[__NSArrayM dealloc] + 116
  2   libobjc.A.dylib                 0x30a4e0be _objc_rootRelease + 30
  3   libobjc.A.dylib                 0x30a4fdb0 objc_release + 32
  4   libobjc.A.dylib                 0x30a4ee06 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 218
  5   libobjc.A.dylib                 0x30a4ed22 _objc_autoreleasePoolPop + 6
  6   CoreFoundation                  0x3759f050 _CFAutoreleasePoolPop + 12
  7   Foundation                      0x337cd460 -[NSAutoreleasePool release] + 120
  8   UIKit                           0x33b8d948 _UIApplicationHandleEvent + 6664
  9   GraphicsServices                0x30ff8ef4 PurpleEventCallback + 876
  10  CoreFoundation                  0x3760a9c4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
  11  CoreFoundation                  0x3760a966 __CFRunLoopDoSource1 + 134
  12  CoreFoundation                  0x3760958c __CFRunLoopRun + 1364
  13  CoreFoundation                  0x375ab036 CFRunLoopRunSpecific + 294
  14  CoreFoundation                  0x375aaefe CFRunLoopRunInMode + 98
  15  UIKit                           0x33b8b758 -[UIApplication _run] + 544
  16  UIKit                           0x33b8898a UIApplicationMain + 1074
  17  BoreBeta                        0x00002d8a main (main.m:14)
  18  BoreBeta                        0x000027f8 start + 32
  
  Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
  Thread 1:
  0   libsystem_kernel.dylib          0x3140d214 kevent + 24
  1   libdispatch.dylib               0x376aaf60 _dispatch_mgr_invoke + 708
  2   libdispatch.dylib               0x376aac7e _dispatch_mgr_thread + 30
  </code></pre>
  
  <p>Etcetera, i believe this is the only helpful part. When i let it crash from running in XCode, i see it crashes in main, and i don't get to see any calltrace, apart from main, UIApplicationMain and CFRelease on top..</p>
  
  <p>In the past, i would look through my code for overreleasing objects, but i doubt this is the case because i'm now using ARC. How do you fix errors like this? </p>
  
  <p>Edit: the code for parsing the data is on a seperate thread using GCD, and that's where my only @autoreleasepool lives. </p>
  
  <p>Also, when running with NSZombieEnabled, i'm getting the NSArrayM release call. Unfortunately, that's the same we read in the crash log, so still no real progress here i'm afraid...</p>
  
  <p>Edit: Ok. Once i fixed all my other memory errors without ARC, i got this error once again. So apparently it's not ARC-related...</p>