iOS NSURLConnection _resourceLoadLoop crash - ios

I met a strange problem
I am using a NSURLConnection to do some URL request
it work fine on simulator
but it crash on ipad2 5.0
I've tried on iPad1 5.01 ,ipad2 4.33,ipad2 5.01, it worked fine
just crash on ipad2 5.0
I'm not sure what problem is
it seems something wrong with
[NSURLConnection(Loader) _resourceLoadLoop:]
I thought maybe NSURLConnection's delegate may be destroy before NSURLConnection do it's job
so I make retain with the delegate,but still crash
does anybody know what may cause this problem?
crash log:
Date/Time: 2012-02-14 23:31:47.416 +0800
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000049de
Highlighted Thread: 3
Thread 0 name: Dispatch queue: com.apple.libdispatch-manager
Thread 0:
0 libsystem_kernel.dylib 0x31e973b4 kevent + 24
1 libdispatch.dylib 0x316a6f74 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x316a6c92 _dispatch_mgr_thread + 30
Thread 1:
0 libsystem_kernel.dylib 0x31ea7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x30d2730a _pthread_wqthread + 610
2 libsystem_c.dylib 0x30d2709c start_wqthread + 0
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x31e97010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x31e97206 mach_msg + 50
2 CoreFoundation 0x371c441c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x371c3154 __CFRunLoopRun + 876
4 CoreFoundation 0x371464d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3714639e CFRunLoopRunInMode + 98
6 WebCore 0x347ac128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
8 libsystem_c.dylib 0x30d2cad0 thread_start + 0
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x31e97010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x31e97206 mach_msg + 50
2 CoreFoundation 0x371c441c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x371c3154 __CFRunLoopRun + 876
4 CoreFoundation 0x371464d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3714639e CFRunLoopRunInMode + 98
6 Foundation 0x31ab0bc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x31ab0a8a -[NSThread main] + 66
8 Foundation 0x31b4459a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
10 libsystem_c.dylib 0x30d2cad0 thread_start + 0
Thread 4 name: WebCore: CFNetwork Loader
Thread 4:
0 libsystem_kernel.dylib 0x31e97010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x31e97206 mach_msg + 50
2 CoreFoundation 0x371c441c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x371c3154 __CFRunLoopRun + 876
4 CoreFoundation 0x371464d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3714639e CFRunLoopRunInMode + 98
6 WebCore 0x347d569e _ZN7WebCoreL15runLoaderThreadEPv + 122
7 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
8 libsystem_c.dylib 0x30d2cad0 thread_start + 0
Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x31ea7570 __select + 20
1 CoreFoundation 0x371c866a __CFSocketManager + 726
2 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
3 libsystem_c.dylib 0x30d2cad0 thread_start + 0
Thread 6 name: WebCore: LocalStorage
Thread 6:
0 libsystem_kernel.dylib 0x31ea7068 __psynch_cvwait + 24
1 libsystem_c.dylib 0x30d2cf2e _pthread_cond_wait + 634
2 libsystem_c.dylib 0x30d2ccaa pthread_cond_wait + 34
3 JavaScriptCore 0x3382040e WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 54
4 WebCore 0x3490b494 WTF::PassOwnPtr<WebCore::LocalStorageTask> WTF::MessageQueue<WebCore::LocalStorageTask>::waitForMessageFilteredWithTimeout<bool ()(WebCore::LocalStorageTask*)>(WTF::MessageQueueWaitResult&, bool (&)(WebCore::LocalStorageTask*), double) + 52
5 WebCore 0x3490b44a WebCore::LocalStorageThread::threadEntryPointCallback(void*) + 106
6 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
7 libsystem_c.dylib 0x30d2cad0 thread_start + 0
Unknown thread crashed with ARM Thread State:
r0: 0x0000499a r1: 0x00000000 r2: 0x35fca80d r3: 0x00000000
r4: 0x0014bf50 r5: 0x3e4ce540 r6: 0x00115030 r7: 0x00000000
r8: 0x001d5a60 r9: 0x000000fb r10: 0x2fe5a688 r11: 0x305b1913
ip: 0x00067a2d sp: 0x2fe5a688 lr: 0x00067a49 pc: 0x30878f4e
cpsr: 0x60000030

When the crash logs say "Highlighted Thread:" it may still be a different thread. It is not sure.
All threads except thread 0 (main thread) seem to be stopped at waits or traps. Since thread zero is the only one that appears active, it is the real source of the crash.
Since thread 0 does have main() or UIApplication at the bottom, the stack is probably corrupted or it is in some system functions which use a non-standard way of building stack frames.

Related

iOS Crash log - no application code

We are getting a crash on a device, with a weird crash log that does not contain any of our application's code in it. Any idea what could be causing this?
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000e0000010
Triggered by Thread: 5
Thread 0:
0 libsystem_kernel.dylib 0x3a773a50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a773849 mach_msg + 37
2 CoreFoundation 0x2f5c6625 __CFRunLoopServiceMachPort + 153
3 CoreFoundation 0x2f5c4d8b __CFRunLoopRun + 859
4 CoreFoundation 0x2f52f765 CFRunLoopRunSpecific + 521
5 CoreFoundation 0x2f52f547 CFRunLoopRunInMode + 103
6 GraphicsServices 0x344666cf GSEventRunModal + 135
7 UIKit 0x31e8e88d UIApplicationMain + 1133
8 MyApp 0x0002ae4b main (main.m:15)
9 MyApp 0x0001ff44 start + 36
Thread 1:
0 libsystem_kernel.dylib 0x3a773804 kevent64 + 24
1 libdispatch.dylib 0x3a6c2051 _dispatch_mgr_invoke + 229
2 libdispatch.dylib 0x3a6bc2df _dispatch_mgr_thread + 35
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x3a773a50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a773849 mach_msg + 37
2 CoreFoundation 0x2f5c6625 __CFRunLoopServiceMachPort + 153
3 CoreFoundation 0x2f5c4d45 __CFRunLoopRun + 789
4 CoreFoundation 0x2f52f765 CFRunLoopRunSpecific + 521
5 CoreFoundation 0x2f52f547 CFRunLoopRunInMode + 103
6 Foundation 0x2ff6f23d +[NSURLConnection(Loader) _resourceLoadLoop:] + 317
7 Foundation 0x2ffe4a0b __NSThread__main__ + 1059
8 libsystem_pthread.dylib 0x3a7ed957 _pthread_body + 139
9 libsystem_pthread.dylib 0x3a7ed8c7 _pthread_start + 99
10 libsystem_pthread.dylib 0x3a7ebae4 thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x3a786c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a7ebc1f _pthread_wqthread + 307
2 libsystem_pthread.dylib 0x3a7ebad8 start_wqthread + 4
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x3a786434 __select + 20
1 CoreFoundation 0x2f5ca51f __CFSocketManager + 483
2 libsystem_pthread.dylib 0x3a7ed957 _pthread_body + 139
3 libsystem_pthread.dylib 0x3a7ed8c7 _pthread_start + 99
4 libsystem_pthread.dylib 0x3a7ebae4 thread_start + 4
Thread 5 Crashed:
0 libobjc.A.dylib 0x3a1e066b objc_release + 11
1 libobjc.A.dylib 0x3a1e10cf (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 355
2 libobjc.A.dylib 0x3a1e1b49 (anonymous namespace)::AutoreleasePoolPage::tls_dealloc(void*) + 37
3 libsystem_pthread.dylib 0x3a7ec6cf _pthread_tsd_cleanup + 163
4 libsystem_pthread.dylib 0x3a7ec44f _pthread_exit + 83
5 libsystem_pthread.dylib 0x3a7ed1b5 pthread_exit + 25
6 Foundation 0x2ff386ff +[NSThread exit] + 7
7 Foundation 0x2ffe4a29 __NSThread__main__ + 1089
8 libsystem_pthread.dylib 0x3a7ed957 _pthread_body + 139
9 libsystem_pthread.dylib 0x3a7ed8c7 _pthread_start + 99
10 libsystem_pthread.dylib 0x3a7ebae4 thread_start + 4
Thread 6:
0 libsystem_kernel.dylib 0x3a786c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a7ebc1f _pthread_wqthread + 307
2 libsystem_pthread.dylib 0x3a7ebad8 start_wqthread + 4
Thread 7:
0 libsystem_kernel.dylib 0x3a786c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a7ebc1f _pthread_wqthread + 307
2 libsystem_pthread.dylib 0x3a7ebad8 start_wqthread + 4
Thread 5 crashed with ARM Thread State (32-bit):
r0: 0x156ba550 r1: 0xe0000000 r2: 0x00000001 r3: 0x15b9d028
r4: 0x15b9d000 r5: 0x0679d0a4 r6: 0xa3a3a3a3 r7: 0x0679cd5c
r8: 0x15b9d028 r9: 0x9a001683 r10: 0x00000000 r11: 0x3c473a30
ip: 0x3a96f7b0 sp: 0x0679cb2c lr: 0x3a1e10d3 pc: 0x3a1e066a
cpsr: 0x20000030
We ran a check for Zombie objects but could not find any. Help much appreciated.
We were able to reproduce the issue and discovered that this is a memory issue on iPad Airs. We found that, for some reason, iOS on these iPad Air is trying to free up invalid memory addresses, or addresses that were previously freed up. We are now able to replicate on demand on iPad Airs, but do not see the same issue on other iPads.

iOS - Crash Log when open from lock screen

I'm getting a really weird behavior, my app crashes almost only with the device (I did manage to reproduce the bug on the simulator, but only twice), and only when it is not running from Xcode.
What happens is, I can, sometimes, reproduce the bug by closing the app from the multitask, opening it again, locking the screen fast and unlocking the screen.
Also I get different errors sometimes.
Crash log 1:
Incident Identifier: F2997747-0068-4DA7-BDB8-734B786855E9
CrashReporter Key: 369354cb12966b72d136b40418726dd923de7aae
Hardware Model: iPhone5,1
Process: HomeAutomation [813]
Path: /var/mobile/Applications/6F99E387-2530-4433-8DB8-0B657C4F9742/HomeAutomation.app/HomeAutomation
Identifier: com.carbon306.HomeAutomation
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-10-12 01:49:50.880 -0300
OS Version: iOS 7.0.2 (11A501)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x717ec19e
Triggered by Thread: 6
Thread 0:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41cc2 __CFRunLoopRun + 858
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 GraphicsServices 0x329e32e6 GSEventRunModal + 134
7 UIKit 0x305631e0 UIApplicationMain + 1132
8 HomeAutomation 0x000dbca0 0xd6000 + 23712
9 libdyld.dylib 0x3856cab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x38610838 kevent64 + 24
1 libdispatch.dylib 0x3855f0d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3855963e _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 4:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 5:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41c7c __CFRunLoopRun + 788
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 Foundation 0x2e6e764c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x2e75cdc2 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
9 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
10 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 6 Crashed:
0 libobjc.A.dylib 0x3806eb66 objc_msgSend + 6
1 libdispatch.dylib 0x38558100 _dispatch_call_block_and_release + 8
2 libdispatch.dylib 0x3855d7e0 _dispatch_root_queue_drain + 220
3 libdispatch.dylib 0x3855d9cc _dispatch_worker_thread2 + 52
4 libsystem_pthread.dylib 0x38687dfc _pthread_wqthread + 296
5 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 7:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 8:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x38623440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x2dd4745e __CFSocketManager + 482
2 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
3 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
4 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 10:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 11:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 12:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 6 crashed with ARM Thread State (32-bit):
r0: 0x17ea6320 r1: 0x30b5f763 r2: 0x00000000 r3: 0x00000003
r4: 0x17d96b30 r5: 0x00000000 r6: 0x001c0840 r7: 0x02ac5f8c
r8: 0x00000001 r9: 0x717ec192 r10: 0x00000000 r11: 0x00000000
ip: 0x38b94224 sp: 0x02ac5f88 lr: 0x38558103 pc: 0x3806eb66
cpsr: 0x60000030
Crash log 2:
Incident Identifier: D605BD2A-6787-4534-8AB9-BC89A7DD9945
CrashReporter Key: 369354cb12966b72d136b40418726dd923de7aae
Hardware Model: iPhone5,1
Process: HomeAutomation [698]
Path: /var/mobile/Applications/6F99E387-2530-4433-8DB8-0B657C4F9742/HomeAutomation.app/HomeAutomation
Identifier: com.carbon306.HomeAutomation
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-10-12 01:24:29.139 -0300
OS Version: iOS 7.0.2 (11A501)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 4
Last Exception Backtrace:
0 CoreFoundation 0x2dd78e86 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x380736c2 objc_exception_throw + 34
2 CoreFoundation 0x2dd7c7b2 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
3 CoreFoundation 0x2dd7b0b2 ___forwarding___ + 702
4 CoreFoundation 0x2dcc9e94 __forwarding_prep_0___ + 20
5 libdispatch.dylib 0x385580fe _dispatch_call_block_and_release + 6
6 libdispatch.dylib 0x3855d7e0 _dispatch_root_queue_drain + 220
7 libdispatch.dylib 0x3855d9cc _dispatch_worker_thread2 + 52
8 libsystem_pthread.dylib 0x38687dfa _pthread_wqthread + 294
9 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 0:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41cc2 __CFRunLoopRun + 858
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 GraphicsServices 0x329e32e6 GSEventRunModal + 134
7 UIKit 0x305631e0 UIApplicationMain + 1132
8 HomeAutomation 0x000e4d48 0xdf000 + 23880
9 libdyld.dylib 0x3856cab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x38610838 kevent64 + 24
1 libdispatch.dylib 0x3855f0d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3855963e _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 4 Crashed:
0 libsystem_kernel.dylib 0x386231fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3868aa4e pthread_kill + 54
2 libsystem_c.dylib 0x385d4028 abort + 72
3 libc++abi.dylib 0x37a2298a abort_message + 70
4 libc++abi.dylib 0x37a3b6e2 default_terminate_handler() + 250
5 libobjc.A.dylib 0x38073936 _objc_terminate() + 190
6 libc++abi.dylib 0x37a391b0 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x37a38a04 __cxa_throw + 112
8 libobjc.A.dylib 0x38073796 objc_exception_throw + 246
9 CoreFoundation 0x2dd7c7b2 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
10 CoreFoundation 0x2dd7b0b2 ___forwarding___ + 702
11 CoreFoundation 0x2dcc9e94 __forwarding_prep_0___ + 20
12 libdispatch.dylib 0x38558100 _dispatch_call_block_and_release + 8
13 libdispatch.dylib 0x3855d7e0 _dispatch_root_queue_drain + 220
14 libdispatch.dylib 0x3855d9cc _dispatch_worker_thread2 + 52
15 libsystem_pthread.dylib 0x38687dfc _pthread_wqthread + 296
16 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 5:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687c98 pthread_workqueue_addthreads_np + 40
2 libdispatch.dylib 0x3855d46c _dispatch_queue_wakeup_global_slow + 52
3 libdispatch.dylib 0x3855c5a6 _dispatch_wakeup + 122
4 libdispatch.dylib 0x3855cbe8 _dispatch_queue_push_list_slow2 + 16
5 libdispatch.dylib 0x3855c5a6 _dispatch_wakeup + 122
6 libdispatch.dylib 0x3855cbe8 _dispatch_queue_push_list_slow2 + 16
7 libdispatch.dylib 0x3855f432 _dispatch_mach_msg_send + 518
8 libdispatch.dylib 0x3855a12e dispatch_mach_send + 166
9 libxpc.dylib 0x386948d2 xpc_connection_send_message + 46
10 libsystem_network.dylib 0x3866384a __net_helper_send_block_invoke + 62
11 libdispatch.dylib 0x3855c8f6 _dispatch_barrier_sync_f_invoke + 22
12 libsystem_network.dylib 0x38661c64 net_helper_send + 164
13 libsystem_network.dylib 0x38661b4c net_helper_client_cancel + 76
14 libsystem_network.dylib 0x3865f384 __tcp_connection_cancel_block_invoke + 156
15 libdispatch.dylib 0x385580ec _dispatch_client_callout + 20
16 libdispatch.dylib 0x3855c8f6 _dispatch_barrier_sync_f_invoke + 22
17 libsystem_network.dylib 0x3865f2da tcp_connection_cancel + 102
18 CFNetwork 0x2d972ab4 SocketStream::close(void const*) + 312
19 CFNetwork 0x2d97294e CoreStreamBase::_streamInterface_Close() + 46
20 CFNetwork 0x2d991286 HTTPReadFilter::_streamImpl_Close() + 66
21 CFNetwork 0x2d97294e CoreStreamBase::_streamInterface_Close() + 46
22 CFNetwork 0x2d9911c6 NetConnection::shutdownConnectionStreams() + 98
23 CFNetwork 0x2d9c51b4 NetConnection::errorOccurred(CFStreamError*) + 56
24 CFNetwork 0x2d988b0a HTTPNetConnection::responseStreamCallback(void*, __CoreReadStream*, unsigned long) + 282
25 CFNetwork 0x2d9889d2 NetConnection::connectionResponse(__CoreReadStream*, unsigned long) + 114
26 CFNetwork 0x2d96cb20 CoreReadStreamClient::coreStreamEventsAvailable(unsigned long) + 32
27 CFNetwork 0x2da131f0 CoreStreamBase::_callClientNow(CoreStreamClient*) + 40
28 CFNetwork 0x2d96c8c2 CoreStreamBase::_streamSetEventAndScheduleDelivery(unsigned long, unsigned char) + 118
29 CFNetwork 0x2d96c76e CoreStreamBase::_streamInterface_SignalEvent(unsigned long, CFStreamError const*) + 30
30 CFNetwork 0x2d9878ca HTTPReadFilter::socketReadStreamCallback(unsigned long) + 342
31 CFNetwork 0x2d987762 HTTPReadFilter::_httpRdFilterStreamCallBack(__CoreReadStream*, unsigned long, void*) + 78
32 CFNetwork 0x2d96cb20 CoreReadStreamClient::coreStreamEventsAvailable(unsigned long) + 32
33 CFNetwork 0x2da131f0 CoreStreamBase::_callClientNow(CoreStreamClient*) + 40
34 CFNetwork 0x2d96c8c2 CoreStreamBase::_streamSetEventAndScheduleDelivery(unsigned long, unsigned char) + 118
35 CFNetwork 0x2d96c76e CoreStreamBase::_streamInterface_SignalEvent(unsigned long, CFStreamError const*) + 30
36 CFNetwork 0x2d96c70a SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 50
37 CFNetwork 0x2d96c1ae SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 138
38 CFNetwork 0x2d96c0ea SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 54
39 CoreFoundation 0x2dd46102 __CFSocketPerformV0 + 578
40 CoreFoundation 0x2dd43f24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
41 CoreFoundation 0x2dd433ea __CFRunLoopDoSources0 + 202
42 CoreFoundation 0x2dd41bda __CFRunLoopRun + 626
43 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
44 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
45 Foundation 0x2e6e764c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
46 Foundation 0x2e75cdc2 __NSThread__main__ + 1058
47 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
48 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
49 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 7:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 8 name: com.apple.CFSocket.private
Thread 8:
0 libsystem_kernel.dylib 0x38623440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x2dd4745e __CFSocketManager + 482
2 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
3 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
4 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 4 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x02826000 r6: 0x00000000 r7: 0x02825174
r8: 0x17ddfae0 r9: 0x00000001 r10: 0x30b5f763 r11: 0x00000000
ip: 0x00000148 sp: 0x02825168 lr: 0x3868aa53 pc: 0x386231fc
cpsr: 0x00000010
Crash log 3:
Incident Identifier: 09CD02C2-162E-40FB-8AA5-2F098D833D1C
CrashReporter Key: 369354cb12966b72d136b40418726dd923de7aae
Hardware Model: iPhone5,1
Process: HomeAutomation [679]
Path: /var/mobile/Applications/6F99E387-2530-4433-8DB8-0B657C4F9742/HomeAutomation.app/HomeAutomation
Identifier: com.carbon306.HomeAutomation
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-10-12 01:18:19.932 -0300
OS Version: iOS 7.0.2 (11A501)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x73746564
Triggered by Thread: 5
Thread 0:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41cc2 __CFRunLoopRun + 858
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 GraphicsServices 0x329e32e6 GSEventRunModal + 134
7 UIKit 0x305631e0 UIApplicationMain + 1132
8 HomeAutomation 0x00073d48 main (main.m:16)
9 libdyld.dylib 0x3856cab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x38610838 kevent64 + 24
1 libdispatch.dylib 0x3855f0d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3855963e _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 4:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 5 Crashed:
0 libobjc.A.dylib 0x3807677a lookUpImpOrForward + 46
1 libobjc.A.dylib 0x3806f026 _class_lookupMethodAndLoadCache3 + 30
2 libobjc.A.dylib 0x3806edf6 _objc_msgSend_uncached + 22
3 libdispatch.dylib 0x38558100 _dispatch_call_block_and_release + 8
4 libdispatch.dylib 0x3855d7e0 _dispatch_root_queue_drain + 220
5 libdispatch.dylib 0x3855d9cc _dispatch_worker_thread2 + 52
6 libsystem_pthread.dylib 0x38687dfc _pthread_wqthread + 296
7 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41c7c __CFRunLoopRun + 788
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 Foundation 0x2e6e764c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x2e75cdc2 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
9 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
10 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 7 name: com.apple.CFSocket.private
Thread 7:
0 libsystem_kernel.dylib 0x38623440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x2dd4745e __CFSocketManager + 482
2 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
3 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
4 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 8:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 5 crashed with ARM Thread State (32-bit):
r0: 0x73746564 r1: 0x30b5f763 r2: 0x17e3b980 r3: 0x00000001
r4: 0x30b5f763 r5: 0x30b40a4f r6: 0x00140c40 r7: 0x02837f54
r8: 0x00000000 r9: 0x00000001 r10: 0x00000001 r11: 0x00000000
ip: 0x3806f009 sp: 0x02837f30 lr: 0x3806f02b pc: 0x3807677a
cpsr: 0x80000030
Crash log 4:
Incident Identifier: B9DCE622-A962-4C0F-8653-E0B6EECFCC66
CrashReporter Key: 369354cb12966b72d136b40418726dd923de7aae
Hardware Model: iPhone5,1
Process: HomeAutomation [598]
Path: /var/mobile/Applications/6F99E387-2530-4433-8DB8-0B657C4F9742/HomeAutomation.app/HomeAutomation
Identifier: com.carbon306.HomeAutomation
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-10-12 00:57:58.928 -0300
OS Version: iOS 7.0.2 (11A501)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 4
Last Exception Backtrace:
0 CoreFoundation 0x2dd78e86 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x380736c2 objc_exception_throw + 34
2 CoreFoundation 0x2dd7c7b2 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
3 CoreFoundation 0x2dd7b0b2 ___forwarding___ + 702
4 CoreFoundation 0x2dcc9e94 __forwarding_prep_0___ + 20
5 libdispatch.dylib 0x385580fe _dispatch_call_block_and_release + 6
6 libdispatch.dylib 0x3855d7e0 _dispatch_root_queue_drain + 220
7 libdispatch.dylib 0x3855d9cc _dispatch_worker_thread2 + 52
8 libsystem_pthread.dylib 0x38687dfa _pthread_wqthread + 294
9 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 0:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41cc2 __CFRunLoopRun + 858
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 GraphicsServices 0x329e32e6 GSEventRunModal + 134
7 UIKit 0x305631e0 UIApplicationMain + 1132
8 HomeAutomation 0x00019ca0 main (main.m:16)
9 libdyld.dylib 0x3856cab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x38610838 kevent64 + 24
1 libdispatch.dylib 0x3855f0d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3855963e _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 4 Crashed:
0 libsystem_kernel.dylib 0x386231fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3868aa4e pthread_kill + 54
2 libsystem_c.dylib 0x385d4028 abort + 72
3 libc++abi.dylib 0x37a2298a abort_message + 70
4 libc++abi.dylib 0x37a3b6e2 default_terminate_handler() + 250
5 libobjc.A.dylib 0x38073936 _objc_terminate() + 190
6 libc++abi.dylib 0x37a391b0 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x37a38a04 __cxa_throw + 112
8 libobjc.A.dylib 0x38073796 objc_exception_throw + 246
9 CoreFoundation 0x2dd7c7b2 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
10 CoreFoundation 0x2dd7b0b2 ___forwarding___ + 702
11 CoreFoundation 0x2dcc9e94 __forwarding_prep_0___ + 20
12 libdispatch.dylib 0x38558100 _dispatch_call_block_and_release + 8
13 libdispatch.dylib 0x3855d7e0 _dispatch_root_queue_drain + 220
14 libdispatch.dylib 0x3855d9cc _dispatch_worker_thread2 + 52
15 libsystem_pthread.dylib 0x38687dfc _pthread_wqthread + 296
16 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 5:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 6:
0 libsystem_kernel.dylib 0x38623c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38687e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38687cc0 start_wqthread + 4
Thread 7 name: com.apple.NSURLConnectionLoader
Thread 7:
0 libsystem_kernel.dylib 0x38610a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3861087c mach_msg + 36
2 CoreFoundation 0x2dd4355c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2dd41c7c __CFRunLoopRun + 788
4 CoreFoundation 0x2dcac53c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2dcac31e CFRunLoopRunInMode + 102
6 Foundation 0x2e6e764c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x2e75cdc2 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
9 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
10 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 8 name: com.apple.CFSocket.private
Thread 8:
0 libsystem_kernel.dylib 0x38623440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x2dd4745e __CFSocketManager + 482
2 libsystem_pthread.dylib 0x38689c5a _pthread_body + 138
3 libsystem_pthread.dylib 0x38689bca _pthread_start + 98
4 libsystem_pthread.dylib 0x38687ccc thread_start + 4
Thread 4 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x0275c000 r6: 0x00000000 r7: 0x0275b174
r8: 0x165970a0 r9: 0x00000001 r10: 0x30b5f763 r11: 0x00000000
ip: 0x00000148 sp: 0x0275b168 lr: 0x3868aa53 pc: 0x386231fc
cpsr: 0x00000010
Also I think it has something to do with this method:
- [UIManagedDocument openWithCompletionHandler:]
because if I comment out this line (used to open the document when document.documentState == UIDocumentStateClosed), the crash stops.
Just to make it easier, that UIManagedDocument Singleton Code openWithCompletionHandler called twice and crashes is not the problem, because - [UIManagedDocument openWithCompletionHandler:] is not being called twice.
Also, just to be sure, I did try that solution, and didn't change anything.
I'm sorry for the amount of information, but I did try to write here only the most relevant ones, also only one of each type of error that I found.
Thanks for the help.
Below links explains how to symbolicate the crash logs. it sounds useful.
from apples documentation :
https://developer.apple.com/library/ios/technotes/tn2151/_index.html
from raywanderlitch's explanation :
http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs

Crash report when user accesses the addressbook

Incident Identifier: 236B9D70-0A5E-49B4-8A60-797CC9FEFF2B
CrashReporter Key: 38c652a88ce03779805e96d5c4e36f9df820deba
Hardware Model: xxx
Process: LuckyOne [3493]
Path: /var/mobile/Applications/7878C92C-5629-4163-AA84-B1D1C6676D2A/LuckyOne.app/LuckyOne
Identifier: LuckyOne
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-06-26 15:24:11.148 -0700
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Crashed Thread: 1
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x3a436e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a436fd0 mach_msg + 48
2 CoreFoundation 0x3208e2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x3208cfd6 __CFRunLoopRun + 814
4 CoreFoundation 0x32000238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x320000c4 CFRunLoopRunInMode + 100
6 GraphicsServices 0x35bbb336 GSEventRunModal + 70
7 UIKit 0x33f1c2b4 UIApplicationMain + 1116
8 LuckyOne 0x0003e42e 0x3c000 + 9262
9 LuckyOne 0x0003e3e4 0x3c000 + 9188
Thread 1 name: Dispatch queue: com.apple.root.default-priority
Thread 1 Crashed:
0 CoreFoundation 0x31ffa68a CFRelease + 18
1 LuckyOne 0x00040830 0x3c000 + 18480
2 LuckyOne 0x0004036e 0x3c000 + 17262
3 AddressBook 0x318618d0 __37-[ABTCC accessRequestWithCompletion:]_block_invoke_0 + 24
4 TCC 0x3776455e __TCCAccessRequest_block_invoke_038 + 314
5 libxpc.dylib 0x3a4877a6 _xpc_connection_call_reply + 22
6 libdispatch.dylib 0x3a371652 _dispatch_root_queue_drain + 274
7 libdispatch.dylib 0x3a3717d4 _dispatch_worker_thread2 + 88
8 libsystem_c.dylib 0x3a3957ee _pthread_wqthread + 358
9 libsystem_c.dylib 0x3a395680 start_wqthread + 4
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x3a4375d0 kevent64 + 24
1 libdispatch.dylib 0x3a372d22 _dispatch_mgr_invoke + 806
2 libdispatch.dylib 0x3a36e374 _dispatch_mgr_thread + 32
Thread 3:
0 libsystem_kernel.dylib 0x3a447d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3a395ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3a3957f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3a395680 start_wqthread + 4
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x3a436e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a436fd0 mach_msg + 48
2 CoreFoundation 0x3208e2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x3208d02c __CFRunLoopRun + 900
4 CoreFoundation 0x32000238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x320000c4 CFRunLoopRunInMode + 100
6 WebCore 0x37fe4390 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x3a3a00de _pthread_start + 306
8 libsystem_c.dylib 0x3a39ffa4 thread_start + 4
Thread 5:
0 libsystem_kernel.dylib 0x3a447d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3a395ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3a3957f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3a395680 start_wqthread + 4
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x3a436e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a436fd0 mach_msg + 48
2 CoreFoundation 0x3208e2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x3208d02c __CFRunLoopRun + 900
4 CoreFoundation 0x32000238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x320000c4 CFRunLoopRunInMode + 100
6 Foundation 0x3294d888 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7 Foundation 0x329d122c __NSThread__main__ + 968
8 libsystem_c.dylib 0x3a3a00de _pthread_start + 306
9 libsystem_c.dylib 0x3a39ffa4 thread_start + 4
Thread 7:
0 libsystem_kernel.dylib 0x3a447d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3a395ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3a3957f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3a395680 start_wqthread + 4
Thread 8 name: com.apple.CFSocket.private
Thread 8:
0 libsystem_kernel.dylib 0x3a447594 __select + 20
1 CoreFoundation 0x32092474 __CFSocketManager + 676
2 libsystem_c.dylib 0x3a3a00de _pthread_start + 306
3 libsystem_c.dylib 0x3a39ffa4 thread_start + 4
Thread 9:
0 libsystem_kernel.dylib 0x3a447d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3a395ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3a3957f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3a395680 start_wqthread + 4
Thread 1 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0xffffffff r2: 0x00000007 r3: 0x00000001
r4: 0x1e836370 r5: 0x1e836390 r6: 0x00000000 r7: 0x00240e60
r8: 0x00000000 r9: 0x00000039 r10: 0x3a5b51e4 r11: 0x3a5b51e4
ip: 0x3a5a06c4 sp: 0x00240e2c lr: 0x00040835 pc: 0x31ffa68a
cpsr: 0x60000030`
It appeared you are trying to release an addressbook object with CFRelease without checking if it is null or not.

Accepted AppStore app crash on every device

Just released this morning an app that I tested on all possible devices and simulators, but when I downloaded it from the store the application crashes at startup. I have tested it on many devices and iOS versions, but the result is the same:
Incident Identifier: B34024C9-9F00-4E57-B3AB-068CFFC55119
CrashReporter Key: 81ac2324b459bfeeb1a13c007d9d04e59e6efaf2
Hardware Model: iPhone4,1
Process: iMatematica [9546]
Path: /var/mobile/Applications/CFFA51F9-52F9-4555-8C5B-1B2DDF5E2D5B/iMatematica.app/iMatematica
Identifier: iMatematica
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-08-04 07:24:08.703 +0200
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x35eb532c __pthread_kill + 8
1 libsystem_c.dylib 0x32a01208 pthread_kill + 48
2 libsystem_c.dylib 0x329fa298 abort + 88
3 iMatematica 0x0007eee0 0x1000 + 515808
4 CoreFoundation 0x355ff950 __handleUncaughtException + 68
5 libobjc.A.dylib 0x379a633e _objc_terminate + 122
6 libc++abi.dylib 0x359b53be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x359b544a std::terminate() + 14
8 libc++abi.dylib 0x359b681e __cxa_rethrow + 82
9 libobjc.A.dylib 0x379a62a2 objc_exception_rethrow + 6
10 CoreFoundation 0x35555506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x35555366 CFRunLoopRunInMode + 98
12 UIKit 0x33064864 -[UIApplication _run] + 544
13 UIKit 0x33061cce UIApplicationMain + 1074
14 iMatematica 0x00009a88 main (main.m:18)
15 iMatematica 0x000039b0 0x1000 + 10672
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x35ea53a8 kevent + 24
1 libdispatch.dylib 0x3448ff04 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x3448fc22 _dispatch_mgr_thread + 30
Thread 2:
0 libsystem_kernel.dylib 0x35eb5cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x329bcf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x329bccc8 start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x35eb5cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x329bcf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x329bccc8 start_wqthread + 0
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x35ea5004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35ea51fa mach_msg + 50
2 CoreFoundation 0x355d33ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x355d2124 __CFRunLoopRun + 876
4 CoreFoundation 0x3555549e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x35555366 CFRunLoopRunInMode + 98
6 WebCore 0x31454c9c _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x329c272e _pthread_start + 314
8 libsystem_c.dylib 0x329c25e8 thread_start + 0
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 5:
0 libsystem_kernel.dylib 0x35ea5004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35ea51fa mach_msg + 50
2 CoreFoundation 0x355d33ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x355d2124 __CFRunLoopRun + 876
4 CoreFoundation 0x3555549e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x35555366 CFRunLoopRunInMode + 98
6 Foundation 0x3508ebb2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x3508ea7a -[NSThread main] + 66
8 Foundation 0x3512258a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x329c272e _pthread_start + 314
10 libsystem_c.dylib 0x329c25e8 thread_start + 0
Thread 6:
0 libsystem_kernel.dylib 0x35eb5cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x329bcf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x329bccc8 start_wqthread + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3ec0cd98 r6: 0x00000002 r7: 0x2fdff9c0
r8: 0x3f02bce0 r9: 0x00000000 r10: 0x0021f0a0 r11: 0x33410c0d
ip: 0x00000148 sp: 0x2fdff9b4 lr: 0x32a0120f pc: 0x35eb532c
cpsr: 0x00000010
The problem is only happening to me or is the same as last month: that is a problem of apple server that sign apps?
I solved the problem: changing the language from Italian (my native language) to English, the application works properly. This explains why the AppReview Team has not noticed the crash, and was due to a missing localization in a xib file: "Could not load NIB bundle: 'NSBundle (loaded)' with name 'MasterViewController'"

Crash while integrating Brad Larson's GPUImage

Im trying to integrate Brad Larson's GPUImage framework to my project. The sample code works fine. After I've intergrated, it builds fine but Im facing crash while running it. It crashes at AVCaptureVideoDataOutputSampleBufferDelegate method,
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection;
Particularly at
runOnMainQueueWithoutDeadlocking block. I tried to find out the crash area but couldn't find it even after some few hours of time on seeing the crash log too. I didnt get any idea about the crash. Below is the crash log of Im getting on it. Can some one point me out the issue in it? I also have a doubt that, can I use to continue the queue in name com.sunsetlakesoftware.GPUImage.processingQueue?
Date/Time: 2012-06-19 17:46:28.449 +0530
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xb00566c0
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x344faf78 objc_msgSend + 16
1 GPUTest 0x0017d16a __74-[GPUImageVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:]_block_invoke_0118 (GPUImageVideoCamera.m:415)
2 libdispatch.dylib 0x35b03b24 _dispatch_barrier_sync_f_slow_invoke + 72
3 libdispatch.dylib 0x35b02e8a _dispatch_main_queue_callback_4CF$VARIANT$up + 190
4 CoreFoundation 0x3247d2a6 __CFRunLoopRun + 1262
5 CoreFoundation 0x3240049e CFRunLoopRunSpecific + 294
6 CoreFoundation 0x32400366 CFRunLoopRunInMode + 98
7 GraphicsServices 0x31557432 GSEventRunModal + 130
8 UIKit 0x31effcce UIApplicationMain + 1074
9 GPUTest 0x000b0714 main (main.m:10)
10 GPUTest 0x000b06cc start + 32
Thread 1 name: Dispatch queue: com.sunsetlakesoftware.GPUImage.processingQueue
Thread 1:
0 libsystem_kernel.dylib 0x35b4b054 semaphore_wait_trap + 8
1 libdispatch.dylib 0x35b0447e _dispatch_thread_semaphore_wait$VARIANT$up + 6
2 libdispatch.dylib 0x35b0265e _dispatch_barrier_sync_f_slow + 82
3 libdispatch.dylib 0x35b025dc dispatch_barrier_sync_f$VARIANT$up + 16
4 libdispatch.dylib 0x35b02238 dispatch_sync_f$VARIANT$up + 12
5 libdispatch.dylib 0x35b028ee _dispatch_sync_slow + 46
6 libdispatch.dylib 0x35b028ae dispatch_sync$VARIANT$up + 18
7 GPUTest 0x00172796 runOnMainQueueWithoutDeadlocking (GPUImageOutput.m:13)
8 GPUTest 0x0017d0a6 -[GPUImageVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] (GPUImageVideoCamera.m:414)
9 AVFoundation 0x32dd0244 __74-[AVCaptureVideoDataOutput _AVCaptureVideoDataOutput_VideoDataBecameReady]_block_invoke_0 + 220
10 libdispatch.dylib 0x35af7c52 _dispatch_call_block_and_release + 6
11 libdispatch.dylib 0x35b02ca4 _dispatch_queue_drain + 268
12 libdispatch.dylib 0x35b02b12 _dispatch_queue_invoke$VARIANT$up + 30
13 libdispatch.dylib 0x35b03784 _dispatch_worker_thread2 + 208
14 libsystem_c.dylib 0x30d40df4 _pthread_wqthread + 288
15 libsystem_c.dylib 0x30d40cc8 start_wqthread + 0
Thread 2:
0 libsystem_kernel.dylib 0x35b5bcd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x30d40f36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x30d40cc8 start_wqthread + 0
Thread 3 name: Dispatch queue: com.apple.libdispatch-manager
Thread 3:
0 libsystem_kernel.dylib 0x35b4b3a8 kevent + 24
1 libdispatch.dylib 0x35b03ea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x35b03bc2 _dispatch_mgr_thread + 30
Thread 4:
0 libsystem_kernel.dylib 0x35b5bcd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x30d40f36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x30d40cc8 start_wqthread + 0
Thread 5:
0 libsystem_kernel.dylib 0x35b5bcd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x30d40f36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x30d40cc8 start_wqthread + 0
Thread 6 name: WebThread
Thread 6:
0 libsystem_kernel.dylib 0x35b4b004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35b4b1fa mach_msg + 50
2 CoreFoundation 0x3247e3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x3247d124 __CFRunLoopRun + 876
4 CoreFoundation 0x3240049e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x32400366 CFRunLoopRunInMode + 98
6 WebCore 0x35c1dc9c _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x30d4672e _pthread_start + 314
8 libsystem_c.dylib 0x30d465e8 thread_start + 0
Thread 7 name: com.apple.coremedia.player.async
Thread 7:
0 libsystem_kernel.dylib 0x35b5b068 __psynch_cvwait + 24
1 libsystem_c.dylib 0x30d46a46 _pthread_cond_wait + 634
2 libsystem_c.dylib 0x30d467c2 pthread_cond_wait + 34
3 CoreMedia 0x32ec3868 FigSemaphoreWaitRelative + 268
4 MediaToolbox 0x309fb3e6 fpa_AsyncMovieControlThread + 22
5 CoreMedia 0x32ee28b4 figThreadMain + 168
6 libsystem_c.dylib 0x30d4672e _pthread_start + 314
7 libsystem_c.dylib 0x30d465e8 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00541c20 r1: 0x00190b4f r2: 0x0056f240 r3: 0x00190b4f
r4: 0xb00566b8 r5: 0x00000000 r6: 0x00000000 r7: 0x2feace34
r8: 0x2feace4c r9: 0x000642d3 r10: 0x2feace4c r11: 0x3e47dde0
ip: 0x3f3c22c8 sp: 0x2feace24 lr: 0x0017d171 pc: 0x344faf78
cpsr: 0x20000030
Finally, I found the solution. I just replaced the compiler flag of the AppDelegate in target's compile sources which is set for the purpose of ARC.
i.e. I removed the -fno-objc-arc flag and replaced it by -fobjc-arc flag for the AppDelegate class which caused the crash.

Resources