Thread: Crashed: com.apple.NSURLConnectionLoader for iOS 7.1.x - ios

This crash seems to be happening for iOS 7.1.1 and 7.1.2 with AFNetworking 2.5.3:
Here's the stack trace:
Thread : Crashed: com.apple.NSURLConnectionLoader
0 libobjc.A.dylib 0x000000018ef241d0 objc_msgSend + 16
1 CFNetwork 0x0000000182567c30 HTTPConnectionCacheEntry::notifyNextProtocolOfOpenConnection(NetConnection*, unsigned char) + 200
2 CFNetwork 0x0000000182577274 NetConnection::responseIsComplete(void*) + 256
3 CFNetwork 0x0000000182577118 HTTPNetStreamInfo::sendStreamIsComplete() + 72
4 CFNetwork 0x0000000182575df0 HTTPNetStreamInfo::_streamImpl_Read(unsigned char*, long, CFStreamError*, unsigned char*) + 392
5 CFNetwork 0x000000018254efd8 CoreStreamBase::_streamInterface_Read(unsigned char*, long) + 184
6 CFNetwork 0x0000000182575970 HTTPProtocol::bytesAvailable(unsigned char) + 224
7 CFNetwork 0x0000000182573e40 HTTPProtocol::httpReadStreamEvent(unsigned long) + 596
8 CFNetwork 0x000000018254d4a4 CoreReadStreamClient::coreStreamEventsAvailable(unsigned long) + 64
9 CFNetwork 0x000000018262be94 CoreStreamBase::_callClientNow(CoreStreamClient*) + 64
10 CFNetwork 0x000000018262bed4 ___ZN14CoreStreamBase34_streamSetEventAndScheduleDeliveryEmh_block_invoke + 40
11 CoreFoundation 0x00000001829095e0 CFArrayApplyFunction + 68
12 CFNetwork 0x0000000182560a1c RunloopBlockContext::perform() + 136
13 CFNetwork 0x0000000182560898 MultiplexerSource::perform() + 288
14 CFNetwork 0x00000001825606d4 MultiplexerSource::_perform(void*) + 60
15 CoreFoundation 0x00000001829cb644 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
16 CoreFoundation 0x00000001829ca9a0 __CFRunLoopDoSources0 + 256
17 CoreFoundation 0x00000001829c8c38 __CFRunLoopRun + 632
18 CoreFoundation 0x0000000182909c20 CFRunLoopRunSpecific + 452
19 Foundation 0x00000001834fe428 +[NSURLConnection(Loader) _resourceLoadLoop:] + 348
20 Foundation 0x000000018358c40c __NSThread__main__ + 1000
21 libsystem_pthread.dylib 0x000000018f683e1c _pthread_body + 168
22 libsystem_pthread.dylib 0x000000018f683d74 _pthread_body + 138
23 libsystem_pthread.dylib 0x000000018f681554 thread_start + 4
Does anyone know what's the root cause for this? Is there a solution for it available?

Related

iOS 7 CFNetwork crash

My application crashing on iOS 7 in com.apple.NSURLConnectionLoader thread with this crash log:
Crashed: com.apple.NSURLConnectionLoader
0 CoreFoundation 0x2fb2e79e CFArrayGetCount + 5
1 CFNetwork 0x2f7fcc03 HTTPConnectionCacheEntry::notifyNextProtocolOfOpenConnection(NetConnection*, unsigned char) + 158
2 CFNetwork 0x2f7fcc03 HTTPConnectionCacheEntry::notifyNextProtocolOfOpenConnection(NetConnection*, unsigned char) + 158
3 CFNetwork 0x2f8084df NetConnection::responseIsComplete(void*) + 162
4 CFNetwork 0x2f808405 HTTPNetStreamInfo::sendStreamIsComplete() + 48
5 CFNetwork 0x2f805311 HTTPNetConnection::responseStreamCallback(void*, __CoreReadStream*, unsigned long) + 308
6 CFNetwork 0x2f8051c1 NetConnection::connectionResponse(__CoreReadStream*, unsigned long) + 116
7 CFNetwork 0x2f7e9391 CoreReadStreamClient::coreStreamEventsAvailable(unsigned long) + 36
8 CFNetwork 0x2f890497 CoreStreamBase::_callClientNow(CoreStreamClient*) + 42
9 CFNetwork 0x2f7e912f CoreStreamBase::_streamSetEventAndScheduleDelivery(unsigned long, unsigned char) + 122
10 CFNetwork 0x2f7e8fd7 CoreStreamBase::_streamInterface_SignalEvent(unsigned long, CFStreamError const*) + 34
11 CFNetwork 0x2f8041a3 HTTPReadFilter::socketReadStreamCallback(unsigned long) + 570
12 CFNetwork 0x2f803f4b HTTPReadFilter::_httpRdFilterStreamCallBack(__CoreReadStream*, unsigned long, void*) + 70
13 CFNetwork 0x2f7e9391 CoreReadStreamClient::coreStreamEventsAvailable(unsigned long) + 36
14 CFNetwork 0x2f890497 CoreStreamBase::_callClientNow(CoreStreamClient*) + 42
15 CFNetwork 0x2f7e912f CoreStreamBase::_streamSetEventAndScheduleDelivery(unsigned long, unsigned char) + 122
16 CFNetwork 0x2f7e8fd7 CoreStreamBase::_streamInterface_SignalEvent(unsigned long, CFStreamError const*) + 34
17 CFNetwork 0x2f7e8f77 SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 54
18 CFNetwork 0x2f7e8a09 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 144
19 CFNetwork 0x2f7e8947 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 58
20 CoreFoundation 0x2fbc83c3 __CFSocketPerformV0 + 578
21 CoreFoundation 0x2fbc620b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
22 CoreFoundation 0x2fbc5761 __CFRunLoopDoSources0 + 340
23 CoreFoundation 0x2fbc3ecf __CFRunLoopRun + 622
24 CoreFoundation 0x2fb2eebf CFRunLoopRunSpecific + 522
25 CoreFoundation 0x2fb2eca3 CFRunLoopRunInMode + 106
26 Foundation 0x3056f087 +[NSURLConnection(Loader) _resourceLoadLoop:] + 318
27 Foundation 0x305e4a5f __NSThread__main__ + 1062
28 libsystem_pthread.dylib 0x3a9d7919 _pthread_body + 140
29 libsystem_pthread.dylib 0x3a9d788b _pthread_start + 102
30 libsystem_pthread.dylib 0x3a9d5aa4 thread_start + 8
There is some info about crash on AFNetworking github page (https://github.com/AFNetworking/AFNetworking/issues/3003), but they closed it and pointed to fabric(https://twittercommunity.com/t/crashes-on-ios-7-after-updating-to-3-3-4/54693/15).
But disabling nor AFNetworking nor Fabric not helped me.
I tried to migrate to NSURLSession, but it did not help.
I've figured out that application crashing more if there is more POST requests. Disabling POST requests seems to eliminate crash completely.
I do not know where to dig further. Maybe someone has come across this. I will be glad to any help!

NSString quotedStringRepresentation crash

In the production build, i am getting this type of crash log, but I am not able to understand it correctly as it points to the Foundation framework
Backtrace:
OS Version: 10.2.1 (14D27)
Device: iPhone 7 Plus
RAM Free: 5.1%
Disk Free: 54.7%
#0. Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x18cc6b014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18cd33450 pthread_kill + 112
2 libsystem_c.dylib 0x18cbdf400 abort + 140
3 libsystem_malloc.dylib 0x18ccafa5c _nano_vet_and_size_of_live + 330
4 libsystem_malloc.dylib 0x18ccb0f18 nano_realloc + 376
5 libsystem_malloc.dylib 0x18cca3240 malloc_zone_realloc + 180
6 Foundation 0x18e6ee628 -[NSString quotedStringRepresentation] + 732
7 Foundation 0x18e6ce44c -[NSString _stringRepresentation] + 376
8 CoreFoundation 0x18dbc4eec -[NSDictionary descriptionWithLocale:indent:] + 996
9 CoreFoundation 0x18dbc84d4 _DescriptionWithLocaleFunc + 76
10 CoreFoundation 0x18dc5e23c __CFStringAppendFormatCore + 7996
11 CoreFoundation 0x18dc659b0 _CFStringAppendFormatAndArgumentsAux2 + 36
12 CoreFoundation 0x18dbc842c -[__NSCFString appendFormat:] + 308
13 Foundation 0x18e78733c -[NSNotification description] + 256
14 Foundation 0x18e790bec _NS_os_log_callback + 140
15 libsystem_trace.dylib 0x18cd57954 <redacted> + 112
16 libsystem_trace.dylib 0x18cd57564 <redacted> + 736
17 libsystem_trace.dylib 0x18cd56004 _os_log_impl + 792
18 MediaPlayer 0x19871bc50 <redacted> + 228
19 CoreFoundation 0x18dc36b10 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
20 CoreFoundation 0x18dc36214 _CFXRegistrationPost + 400
21 CoreFoundation 0x18dc35f90 ___CFXNotificationPost_block_invoke + 60
22 CoreFoundation 0x18dca5b8c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
23 CoreFoundation 0x18db77e64 _CFXNotificationPost + 376
24 Foundation 0x18e6ace0c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
25 Celestial 0x1951115e4 <redacted> + 108
26 Celestial 0x195111540 <redacted> + 372
27 CoreFoundation 0x18dc36b10 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
28 CoreFoundation 0x18dc36214 _CFXRegistrationPost + 400
29 CoreFoundation 0x18dc35f90 ___CFXNotificationPost_block_invoke + 60
30 CoreFoundation 0x18dca5b8c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
31 CoreFoundation 0x18db77e64 _CFXNotificationPost + 376
32 CoreFoundation 0x18db9aca0 CFNotificationCenterPostNotification + 120
33 CoreMedia 0x1905ca8c4 CMNotificationCenterPostNotification + 124
34 CoreMedia 0x1905cab0c fncCallOriginalCallbackAndReleaseWeakListener + 80
35 CoreMedia 0x1905ca5cc fncHandleWeakNotification + 204
36 CoreFoundation 0x18dc36b10 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
37 CoreFoundation 0x18dc36214 _CFXRegistrationPost + 400
38 CoreFoundation 0x18dc35f90 ___CFXNotificationPost_block_invoke + 60
39 CoreFoundation 0x18dca5b8c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
40 CoreFoundation 0x18db77e64 _CFXNotificationPost + 376
41 CoreFoundation 0x18db9aca0 CFNotificationCenterPostNotification + 120
42 CoreMedia 0x1905ca8c4 CMNotificationCenterPostNotification + 124
43 MediaToolbox 0x194b7b5d0 <redacted> + 616
44 MediaToolbox 0x194c9ab88 <redacted> + 1248
45 MediaToolbox 0x194b7ad08 <redacted> + 132
46 MediaToolbox 0x194b7ac58 <redacted> + 56
47 MediaToolbox 0x194b76a60 <redacted> + 104
48 MediaToolbox 0x194c9a4cc <redacted> + 16
49 libdispatch.dylib 0x18cb2b9f0 dispatch_mig_server + 576
50 libdispatch.dylib 0x18cb261bc _dispatch_client_callout + 16
51 libdispatch.dylib 0x18cb32f94 _dispatch_continuation_pop + 576
52 libdispatch.dylib 0x18cb3f634 _dispatch_source_latch_and_call + 204
53 libdispatch.dylib 0x18cb28160 _dispatch_source_invoke + 820
54 libdispatch.dylib 0x18cb2abbc _dispatch_main_queue_callback_4CF + 572
55 CoreFoundation 0x18dc4a810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
56 CoreFoundation 0x18dc483fc __CFRunLoopRun + 1660
57 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
58 GraphicsServices 0x18f62a198 GSEventRunModal + 180
59 UIKit 0x193bbd7fc -[UIApplication _run] + 684
60 UIKit 0x193bb8534 UIApplicationMain + 208
61 appname 0x1000a7470 main (main.m:16)
62 libdispatch.dylib 0x18cb595b8 (Missing)
--
#0. Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x18cc6b014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18cd33450 pthread_kill + 112
2 libsystem_c.dylib 0x18cbdf400 abort + 140
3 libsystem_malloc.dylib 0x18ccafa5c _nano_vet_and_size_of_live + 330
4 libsystem_malloc.dylib 0x18ccb0f18 nano_realloc + 376
5 libsystem_malloc.dylib 0x18cca3240 malloc_zone_realloc + 180
6 Foundation 0x18e6ee628 -[NSString quotedStringRepresentation] + 732
7 Foundation 0x18e6ce44c -[NSString _stringRepresentation] + 376
8 CoreFoundation 0x18dbc4eec -[NSDictionary descriptionWithLocale:indent:] + 996
9 CoreFoundation 0x18dbc84d4 _DescriptionWithLocaleFunc + 76
10 CoreFoundation 0x18dc5e23c __CFStringAppendFormatCore + 7996
11 CoreFoundation 0x18dc659b0 _CFStringAppendFormatAndArgumentsAux2 + 36
12 CoreFoundation 0x18dbc842c -[__NSCFString appendFormat:] + 308
13 Foundation 0x18e78733c -[NSNotification description] + 256
14 Foundation 0x18e790bec _NS_os_log_callback + 140
15 libsystem_trace.dylib 0x18cd57954 <redacted> + 112
16 libsystem_trace.dylib 0x18cd57564 <redacted> + 736
17 libsystem_trace.dylib 0x18cd56004 _os_log_impl + 792
18 MediaPlayer 0x19871bc50 <redacted> + 228
19 CoreFoundation 0x18dc36b10 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
20 CoreFoundation 0x18dc36214 _CFXRegistrationPost + 400
21 CoreFoundation 0x18dc35f90 ___CFXNotificationPost_block_invoke + 60
22 CoreFoundation 0x18dca5b8c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
23 CoreFoundation 0x18db77e64 _CFXNotificationPost + 376
24 Foundation 0x18e6ace0c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
25 Celestial 0x1951115e4 <redacted> + 108
26 Celestial 0x195111540 <redacted> + 372
27 CoreFoundation 0x18dc36b10 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
28 CoreFoundation 0x18dc36214 _CFXRegistrationPost + 400
29 CoreFoundation 0x18dc35f90 ___CFXNotificationPost_block_invoke + 60
30 CoreFoundation 0x18dca5b8c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
31 CoreFoundation 0x18db77e64 _CFXNotificationPost + 376
32 CoreFoundation 0x18db9aca0 CFNotificationCenterPostNotification + 120
33 CoreMedia 0x1905ca8c4 CMNotificationCenterPostNotification + 124
34 CoreMedia 0x1905cab0c fncCallOriginalCallbackAndReleaseWeakListener + 80
35 CoreMedia 0x1905ca5cc fncHandleWeakNotification + 204
36 CoreFoundation 0x18dc36b10 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
37 CoreFoundation 0x18dc36214 _CFXRegistrationPost + 400
38 CoreFoundation 0x18dc35f90 ___CFXNotificationPost_block_invoke + 60
39 CoreFoundation 0x18dca5b8c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
40 CoreFoundation 0x18db77e64 _CFXNotificationPost + 376
41 CoreFoundation 0x18db9aca0 CFNotificationCenterPostNotification + 120
42 CoreMedia 0x1905ca8c4 CMNotificationCenterPostNotification + 124
43 MediaToolbox 0x194b7b5d0 <redacted> + 616
44 MediaToolbox 0x194c9ab88 <redacted> + 1248
45 MediaToolbox 0x194b7ad08 <redacted> + 132
46 MediaToolbox 0x194b7ac58 <redacted> + 56
47 MediaToolbox 0x194b76a60 <redacted> + 104
48 MediaToolbox 0x194c9a4cc <redacted> + 16
49 libdispatch.dylib 0x18cb2b9f0 dispatch_mig_server + 576
50 libdispatch.dylib 0x18cb261bc _dispatch_client_callout + 16
51 libdispatch.dylib 0x18cb32f94 _dispatch_continuation_pop + 576
52 libdispatch.dylib 0x18cb3f634 _dispatch_source_latch_and_call + 204
53 libdispatch.dylib 0x18cb28160 _dispatch_source_invoke + 820
54 libdispatch.dylib 0x18cb2abbc _dispatch_main_queue_callback_4CF + 572
55 CoreFoundation 0x18dc4a810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
56 CoreFoundation 0x18dc483fc __CFRunLoopRun + 1660
57 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
58 GraphicsServices 0x18f62a198 GSEventRunModal + 180
59 UIKit 0x193bbd7fc -[UIApplication _run] + 684
60 UIKit 0x193bb8534 UIApplicationMain + 208
61 appname 0x1000a7470 main (main.m:16)
62 libdispatch.dylib 0x18cb595b8 (Missing)
#1. com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x18cc4d188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x18cc4cff8 mach_msg + 72
2 CoreFoundation 0x18dc4a5d0 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x18dc481ec __CFRunLoopRun + 1132
4 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
5 Foundation 0x18e6b326c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x18e6d3dd0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7 UIKit 0x194531c38 -[UIEventFetcher threadMain] + 136
8 Foundation 0x18e7b0e68 __NSThread__start__ + 1024
9 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
10 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
11 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#2. AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x18cc4d188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x18cc4cff8 mach_msg + 72
2 CoreFoundation 0x18dc4a5d0 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x18dc481ec __CFRunLoopRun + 1132
4 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
5 AVFAudio 0x1a767bd24 GenericRunLoopThread::Entry(void*) + 164
6 AVFAudio 0x1a76a1d9c CAPThread::Entry(CAPThread*) + 84
7 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
8 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
9 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#3. com.apple.coreaudio.AQClient
0 libsystem_kernel.dylib 0x18cc4d188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x18cc4cff8 mach_msg + 72
2 CoreFoundation 0x18dc4a5d0 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x18dc481ec __CFRunLoopRun + 1132
4 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
5 AudioToolbox 0x190c440cc GenericRunLoopThread::Entry(void*) + 164
6 AudioToolbox 0x190e1c230 CAPThread::Entry(CAPThread*) + 84
7 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
8 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
9 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#4. com.twitter.crashlytics.ios.MachExceptionServer
0 libsystem_kernel.dylib 0x18cc4d188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x18cc4cff8 mach_msg + 72
2 appname 0x1002dc570 CLSMachExceptionServer + 4297590128
3 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
4 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
5 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#5. com.apple.NSURLConnectionLoader
0 libsystem_c.dylib 0x18cb7d5d4 strlen + 52
1 libc++.1.dylib 0x18c69137c std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const + 28
2 libc++.1.dylib 0x18c69137c std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const + 28
3 CFNetwork 0x18e2bceec <redacted> + 236
4 CFNetwork 0x18e48eb6c <redacted> + 76
5 libdispatch.dylib 0x18cb261bc _dispatch_client_callout + 16
6 libdispatch.dylib 0x18cb337f0 _dispatch_barrier_sync_f_invoke + 84
7 CFNetwork 0x18e48eaf8 <redacted> + 96
8 CFNetwork 0x18e2b36a4 <redacted> + 228
9 CFNetwork 0x18e2b3858 <redacted> + 152
10 CFNetwork 0x18e4085e0 <redacted> + 40
11 CFNetwork 0x18e3d1c80 <redacted> + 136
12 CFNetwork 0x18e3d2388 <redacted> + 248
13 CFNetwork 0x18e425794 <redacted> + 88
14 CFNetwork 0x18e423328 <redacted> + 32
15 libdispatch.dylib 0x18cb261bc _dispatch_client_callout + 16
16 libdispatch.dylib 0x18cb31ab0 _dispatch_block_invoke_direct + 376
17 CFNetwork 0x18e4d6598 <redacted> + 36
18 CoreFoundation 0x18db75c18 CFArrayApplyFunction + 68
19 CFNetwork 0x18e4d647c <redacted> + 136
20 CFNetwork 0x18e4d77a4 <redacted> + 312
21 CFNetwork 0x18e4d7510 <redacted> + 64
22 CoreFoundation 0x18dc4ab5c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
23 CoreFoundation 0x18dc4a4a4 __CFRunLoopDoSources0 + 524
24 CoreFoundation 0x18dc480a4 __CFRunLoopRun + 804
25 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
26 CFNetwork 0x18e37ba70 <redacted> + 336
27 Foundation 0x18e7b0e68 __NSThread__start__ + 1024
28 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
29 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
30 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#6. Thread
0 libsystem_kernel.dylib 0x18cc6ae1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18cd309c0 <redacted> + 640
2 libc++.1.dylib 0x18c6593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3 JavaScriptCore 0x19247a5d0 <redacted> + 112
4 JavaScriptCore 0x19247a544 <redacted> + 168
5 JavaScriptCore 0x19247a424 <redacted> + 10
6 JavaScriptCore 0x19247a6d4 <redacted> + 92
7 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
8 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
9 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#7. WebThread
0 libsystem_kernel.dylib 0x18cc4d188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x18cc4cff8 mach_msg + 72
2 CoreFoundation 0x18dc4a5d0 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x18dc481ec __CFRunLoopRun + 1132
4 CoreFoundation 0x18db762b8 CFRunLoopRunSpecific + 444
5 WebCore 0x19277c490 <redacted> + 456
6 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
7 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
8 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#8. JIT Worklist Worker Thread
0 libsystem_kernel.dylib 0x18cc6ae1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18cd309c0 <redacted> + 640
2 libc++.1.dylib 0x18c6593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3 JavaScriptCore 0x192462d64 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2132
4 JavaScriptCore 0x19223aa5c <redacted> + 192
5 JavaScriptCore 0x19223aeac <redacted> + 14
6 JavaScriptCore 0x191bab00c <redacted> + 212
7 JavaScriptCore 0x191baaf1c <redacted> + 24
8 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
9 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
10 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#9. WTF Parallel Helper Thread
0 libsystem_kernel.dylib 0x18cc6ae1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18cd309c0 <redacted> + 640
2 libc++.1.dylib 0x18c6593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3 JavaScriptCore 0x192462d64 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2132
4 JavaScriptCore 0x1924622e8 <redacted> + 288
5 JavaScriptCore 0x192462088 <redacted> + 76
6 JavaScriptCore 0x191bab00c <redacted> + 212
7 JavaScriptCore 0x191baaf1c <redacted> + 24
8 libsystem_pthread.dylib 0x18cd31850 <redacted> + 240
9 libsystem_pthread.dylib 0x18cd31760 _pthread_start + 282
10 libsystem_pthread.dylib 0x18cd2ed94 thread_start + 4
#10. Thread
0 CoreFoundation 0x18dc3c680 __CFTSDFinalize + 40
1 libsystem_pthread.dylib 0x18cd2ffbc <redacted> + 572
2 libsystem_pthread.dylib 0x18cd2fce4 <redacted> + 200
3 libsystem_pthread.dylib 0x18cd2f378 _pthread_wqthread + 1502
4 libsystem_pthread.dylib 0x18cd2ed8c start_wqthread + 4
#11. Thread
0 libsystem_pthread.dylib 0x18cd2ed88 pthread_workqueue_addthreads_np + 126
#12. Thread
0 libsystem_malloc.dylib 0x18cca1a04 szone_size + 192
1 libsystem_malloc.dylib 0x18cca171c free + 108
2 libdispatch.dylib 0x18cb2eb1c _dispatch_cache_cleanup + 24
3 libsystem_pthread.dylib 0x18cd2ffbc <redacted> + 572
4 libsystem_pthread.dylib 0x18cd2fce4 <redacted> + 200
5 libsystem_pthread.dylib 0x18cd2f378 _pthread_wqthread + 1502
6 libsystem_pthread.dylib 0x18cd2ed8c start_wqthread + 4
#13. Thread
0 libsystem_malloc.dylib 0x18ccafbb4 _nano_vet_and_size_of_live + 344
1 libsystem_malloc.dylib 0x18cca171c free + 108
2 libsystem_malloc.dylib 0x18cca171c free + 108
3 libdispatch.dylib 0x18cb2eb1c _dispatch_cache_cleanup + 24
4 libsystem_pthread.dylib 0x18cd2ffbc <redacted> + 572
5 libsystem_pthread.dylib 0x18cd2fce4 <redacted> + 200
6 libsystem_pthread.dylib 0x18cd2f378 _pthread_wqthread + 1502
7 libsystem_pthread.dylib 0x18cd2ed8c start_wqthread + 4
#14. Thread
0 libsystem_malloc.dylib 0x18ccafbb4 _nano_vet_and_size_of_live + 344
1 libsystem_malloc.dylib 0x18cca171c free + 108
2 libsystem_malloc.dylib 0x18cca171c free + 108
3 libsystem_c.dylib 0x18cb7d490 gdtoa_freelist_free + 48
4 libsystem_pthread.dylib 0x18cd2ffbc <redacted> + 572
5 libsystem_pthread.dylib 0x18cd2fce4 <redacted> + 200
6 libsystem_pthread.dylib 0x18cd2f378 _pthread_wqthread + 1502
7 libsystem_pthread.dylib 0x18cd2ed8c start_wqthread + 4
#15. Thread
0 libsystem_pthread.dylib 0x18cd2ed88 pthread_workqueue_addthreads_np + 126
#16. Thread
0 libsystem_kernel.dylib 0x18cc6ba88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x18cd2f160 _pthread_wqthread + 968
2 libsystem_pthread.dylib 0x18cd2ed8c start_wqthread + 4
#17. Thread
0 libsystem_pthread.dylib 0x18cd2ed88 pthread_workqueue_addthreads_np + 126
Based on trace I am assuming it may crash because of Bad value in the dictionary key.
How can i get more information and what can be solution for this?

App Crashes when rendering long text

In an iOS app if I set long text to a cusotm cell in UITableView, I receive a long crash ( the texts are in Arabic ):
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000102d2fffe
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CoreText 0x0000000184dac018 TRunGlue::GetGlyphID(long) const + 68
1 CoreText 0x0000000184dac00c TRunGlue::GetGlyphID(long) const + 56
2 CoreText 0x0000000184dd2358 TAATMorphSubtableMorx::DoInsertionSubtable(TRunGlue&, TAATMorphSubtableMorx::MorxInsertionState&, TRunGlue::TGlyph, long, TAATMorphSubtable::GlyphState, MorphActionResultCode&) + 760
3 CoreText 0x0000000184ddbb1c std::__1::pair<bool, MorphActionResultCode> TAATMorphSubtableMorx::ProcessT<TRunGlue::TGlyphInSingleRun, true>(TRunGlue&, CFRange, unsigned int) + 620
4 CoreText 0x0000000184dfb03c TAATMorphTable::ShapeGlyphs(SyncState&, bool&, __CFString const*) + 616
5 CoreText 0x0000000184deaacc TShapingEngine::ShapeGlyphs(TLine&, TCharStream const&) + 336
6 CoreText 0x0000000184dee100 TTypesetter::FinishEncoding(std::__1::tuple<TLine const*, TCharStream const*, void const* (*)(__CTRun const*, __CFString const*, void*), void*, std::__1::shared_ptr<TBidiLevelsProvider>*, unsigned int, unsigned char> const&, TLine&, signed char) + 236
7 CoreText 0x0000000184db8b64 TTypesetterAttrString::Initialize(__CFAttributedString const*) + 660
8 CoreText 0x0000000184db879c TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*) + 108
9 CoreText 0x0000000184db8684 CTLineCreateWithAttributedString + 56
10 UIFoundation 0x0000000187f52eac __NSStringDrawingEngine + 4096
11 UIFoundation 0x0000000187f51e60 -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 156
12 UIKit 0x0000000187fefd58 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 732
13 UIKit 0x0000000187fef9e0 -[UILabel _intrinsicSizeWithinSize:] + 128
14 UIKit 0x00000001880e5e28 -[UILabel intrinsicContentSize] + 96
15 UIKit 0x00000001880e5c1c -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 52
16 UIKit 0x00000001880e5784 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 488
17 UIKit 0x0000000188937ddc -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 76
18 UIKit 0x0000000188936b00 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 192
19 UIKit 0x0000000188936e48 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 632
20 UIKit 0x0000000188936dd0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 512
21 Foundation 0x0000000182bc8510 -[NSISEngine withBehaviors:performModifications:] + 168
22 UIKit 0x0000000188937094 -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 120
23 UIKit 0x0000000188936dd0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 512
24 UIKit 0x00000001889375f0 __97-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededPostponeVariableChangeNotifications:]_block_invoke + 84
25 UIKit 0x00000001889367b0 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 136
26 UIKit 0x00000001889371f8 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededPostponeVariableChangeNotifications:] + 164
27 UIKit 0x0000000188934354 -[UIView(AdditionalLayoutSupport) _systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:hasIntentionallyCollapsedHeight:] + 288
28 UIKit 0x00000001884bd954 -[UITableViewCell systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:] + 344
29 UIKit 0x000000018832c4f8 -[UITableView _heightForCell:atIndexPath:] + 392
30 UIKit 0x00000001881278b4 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 2936
31 UIKit 0x0000000187ff3294 +[UIView(Animation) performWithoutAnimation:] + 104
32 UIKit 0x0000000188126d18 -[UITableView _configureCellForDisplay:forIndexPath:] + 460
33 UIKit 0x0000000188328440 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 824
34 UIKit 0x0000000188328604 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80
35 UIKit 0x0000000188315bac -[UITableView _updateVisibleCellsNow:isRecursive:] + 2304
36 UIKit 0x000000018832d668 -[UITableView _performWithCachedTraitCollection:] + 116
37 UIKit 0x00000001880c9b14 -[UITableView layoutSubviews] + 176
38 UIKit 0x0000000187fe254c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196
39 QuartzCore 0x00000001854aa40c -[CALayer layoutSublayers] + 148
40 QuartzCore 0x000000018549f0e8 CA::Layer::layout_if_needed(CA::Transaction*) + 292
41 QuartzCore 0x000000018549efa8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
42 QuartzCore 0x000000018541bc64 CA::Context::commit_transaction(CA::Transaction*) + 252
43 QuartzCore 0x00000001854430d0 CA::Transaction::commit() + 512
44 QuartzCore 0x0000000185443af0 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120
45 CoreFoundation 0x00000001821497dc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
46 CoreFoundation 0x000000018214740c __CFRunLoopDoObservers + 372
47 CoreFoundation 0x0000000182076068 CFRunLoopRunSpecific + 476
48 UIKit 0x00000001880505dc -[UIApplication _run] + 608
49 UIKit 0x000000018804b360 UIApplicationMain + 208
50 QuranTarjoman 0x0000000100041808 0x100020000 + 137224
51 libdyld.dylib 0x00000001810585b8 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x000000018116aa88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018122d188 _pthread_wqthread + 968
2 libsystem_pthread.dylib 0x000000018122cdb4 start_wqthread + 4
Thread 2 name: com.apple.uikit.eventfetch-thread
Thread 2:
0 libsystem_kernel.dylib 0x000000018114c16c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018114bfdc mach_msg + 72
2 CoreFoundation 0x0000000182149cec __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x0000000182147908 __CFRunLoopRun + 1132
4 CoreFoundation 0x0000000182076048 CFRunLoopRunSpecific + 444
5 Foundation 0x0000000182b84b1c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x0000000182ba560c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7 UIKit 0x00000001889c5c7c -[UIEventFetcher threadMain] + 136
8 Foundation 0x0000000182c8250c __NSThread__start__ + 1024
9 libsystem_pthread.dylib 0x000000018122f860 _pthread_body + 240
10 libsystem_pthread.dylib 0x000000018122f770 _pthread_body + 0
11 libsystem_pthread.dylib 0x000000018122cdbc thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x000000018116a314 __semwait_signal + 8
1 libsystem_c.dylib 0x000000018108827c nanosleep + 212
2 libc++.1.dylib 0x0000000180b99994 std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > const&) + 80
3 JavaScriptCore 0x000000018691e384 void std::__1::this_thread::sleep_for<long long, std::__1::ratio<1l, 1000l> >(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > const&) + 76
4 JavaScriptCore 0x000000018691d484 bmalloc::waitUntilFalse(std::__1::unique_lock<bmalloc::StaticMutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool&) + 128
5 JavaScriptCore 0x000000018691d2c0 bmalloc::Heap::scavenge(std::__1::unique_lock<bmalloc::StaticMutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) + 60
6 JavaScriptCore 0x000000018691d160 bmalloc::Heap::concurrentScavenge() + 80
7 JavaScriptCore 0x000000018691e470 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 92
8 JavaScriptCore 0x000000018691e39c std::__1::__shared_ptr_emplace<std::__1::mutex, std::__1::allocator<std::__1::mutex> >::~__shared_ptr_emplace() + 0
9 JavaScriptCore 0x000000018691e64c void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 92
10 libsystem_pthread.dylib 0x000000018122f860 _pthread_body + 240
11 libsystem_pthread.dylib 0x000000018122f770 _pthread_body + 0
12 libsystem_pthread.dylib 0x000000018122cdbc thread_start + 4
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x0000000181169e64 __psynch_mutexwait + 8
1 libsystem_pthread.dylib 0x0000000181232db4 _pthread_mutex_lock_wait + 96
2 libsystem_pthread.dylib 0x0000000181232fb8 _pthread_mutex_lock_slow + 296
3 WebCore 0x0000000186c19ef4 _WebTryThreadLock(bool) + 128
4 WebCore 0x0000000186c2e668 SendDelegateMessage(NSInvocation*) + 744
5 WebKitLegacy 0x0000000187d05be8 CallFrameLoadDelegate(void (*)(), WebView*, objc_selector*, objc_object*) + 120
6 WebKitLegacy 0x0000000187cd1118 WebFrameLoaderClient::dispatchDidFinishLoad() + 172
7 WebCore 0x0000000186bf1e6c WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 2136
8 WebCore 0x0000000186bf14ec WebCore::FrameLoader::checkLoadComplete() + 372
9 WebCore 0x0000000186c1f5cc WebCore::DocumentLoader::finishedLoading(double) + 388
10 WebCore 0x0000000186c42a18 WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction) + 1800
11 WebCore 0x0000000186c41a3c WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&) + 2024
12 WebCore 0x0000000186f80028 WebCore::DocumentLoader::handleSubstituteDataLoadNow() + 324
13 WebCore 0x0000000186bc3bec WebCore::ThreadTimers::sharedTimerFiredInternal() + 148
14 WebCore 0x0000000186bc3b44 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
15 CoreFoundation 0x000000018214a8f4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
16 CoreFoundation 0x000000018214a608 __CFRunLoopDoTimer + 872
17 CoreFoundation 0x0000000182149ec4 __CFRunLoopDoTimers + 244
18 CoreFoundation 0x0000000182147ac0 __CFRunLoopRun + 1572
19 CoreFoundation 0x0000000182076048 CFRunLoopRunSpecific + 444
20 WebCore 0x0000000186c17a2c RunWebThread(void*) + 456
21 libsystem_pthread.dylib 0x000000018122f860 _pthread_body + 240
22 libsystem_pthread.dylib 0x000000018122f770 _pthread_body + 0
23 libsystem_pthread.dylib 0x000000018122cdbc thread_start + 4
Thread 5:
0 libsystem_pthread.dylib 0x000000018122cdb0 start_wqthread + 0
Thread 6:
0 libsystem_kernel.dylib 0x000000018116aa88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018122d188 _pthread_wqthread + 968
2 libsystem_pthread.dylib 0x000000018122cdb4 start_wqthread + 4
Thread 7 name: JIT Worklist Worker Thread
Thread 7:
0 libsystem_kernel.dylib 0x0000000181169e1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x000000018122e9d0 _pthread_cond_wait + 640
2 libc++.1.dylib 0x0000000180b593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3 JavaScriptCore 0x0000000186906e6c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2016
4 JavaScriptCore 0x00000001866df9b8 JSC::JITWorklist::runThread() + 192
5 JavaScriptCore 0x00000001866dfe08 WTF::Vector<WTF::RefPtr<JSC::JITWorklist::Plan>, 32ul, WTF::CrashOnOverflow, 16ul>::expandCapacity(unsigned long, WTF::RefPtr<JSC::JITWorklist::Plan>*) + 0
6 JavaScriptCore 0x000000018604f35c WTF::threadEntryPoint(void*) + 212
7 JavaScriptCore 0x000000018604f26c WTF::wtfThreadEntryPoint(void*) + 24
8 libsystem_pthread.dylib 0x000000018122f860 _pthread_body + 240
9 libsystem_pthread.dylib 0x000000018122f770 _pthread_body + 0
10 libsystem_pthread.dylib 0x000000018122cdbc thread_start + 4
Thread 8 name: WTF Parallel Helper Thread
Thread 8:
0 libsystem_kernel.dylib 0x0000000181169e1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x000000018122e9d0 _pthread_cond_wait + 640
2 libc++.1.dylib 0x0000000180b593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3 JavaScriptCore 0x0000000186906e6c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2016
4 JavaScriptCore 0x0000000186906464 WTF::ParallelHelperPool::waitForClientWithTask(WTF::Locker<WTF::LockBase> const&) + 288
5 JavaScriptCore 0x0000000186906204 WTF::ParallelHelperPool::helperThreadBody() + 76
6 JavaScriptCore 0x000000018604f35c WTF::threadEntryPoint(void*) + 212
7 JavaScriptCore 0x000000018604f26c WTF::wtfThreadEntryPoint(void*) + 24
8 libsystem_pthread.dylib 0x000000018122f860 _pthread_body + 240
9 libsystem_pthread.dylib 0x000000018122f770 _pthread_body + 0
10 libsystem_pthread.dylib 0x000000018122cdbc thread_start + 4

SIGSEGV ERROR causing wierd crash on app launch and few api calls

From the breadcrumbs , I figured out that the app crashes right after launch and few api calls. What seems to be the issue here? Can't paste any relevant code here as this crash is not reproducible. Following is the stack trace:
Crashed Thread
1 CFNetwork 0x2da6bf95 _ZN8CFObject8AllocateEmRK7CFClassPK13__CFAllocator + 105
2 CFNetwork 0x2da82bd3 _ZN19HTTPConnectionCache21createEmptyCacheEntryEv + 20
3 CFNetwork 0x2da82a43 _ZN19HTTPConnectionCache34_onqueue_enqueueRequestForProtocolEP12HTTPProtocolP15__CFHTTPMessage + 64
4 CFNetwork 0x2dada00d ___ZN19HTTPConnectionCache25enqueueRequestForProtocolEP12HTTPProtocolP15__CFHTTPMessage_block_invoke + 14
5 CoreFoundation 0x2ddb68f1 CFArrayApplyFunction + 34
6 CFNetwork 0x2da7f6bb _ZN19RunloopBlockContext7performEv + 180
7 CFNetwork 0x2da7f579 _ZN17MultiplexerSource7performEv + 218
8 CFNetwork 0x2da7f40d _ZN17MultiplexerSource8_performEPv + 46
9 CoreFoundation 0x2de4e20b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
10 CoreFoundation 0x2de4d6db __CFRunLoopDoSources0 + 204
11 CoreFoundation 0x2de4becf __CFRunLoopRun + 620
12 CoreFoundation 0x2ddb6ebf CFRunLoopRunSpecific + 520
13 CoreFoundation 0x2ddb6ca3 CFRunLoopRunInMode + 104
14 Foundation 0x2e7f7087 +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
15 Foundation 0x2e86ca5f __NSThread__main__ + 1060
16 libsystem_pthread.dylib 0x38d29919 _pthread_body + 138
17 libsystem_pthread.dylib 0x38d2988b _pthread_start + 100
18 libsystem_pthread.dylib 0x38d27aa4 thread_start + 6

Unknown crash reason (with CrashReport attached) SIGTRAP. AFNetworking?

I keep getting these crashes in my app that´s in the AppStore. The CrashReport always looks like this:
Incident Identifier: 986486D7-F013-4102-B9E3-84F923223914
CrashReporter Key: [TODO]
Hardware Model: iPhone4,1
Process: MyApp [57885]
Path: /Users/USER/MyApp.app/MyApp
Identifier: de.myapp.iphone
Version: 12475
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2012-12-20 15:48:53 +0000
OS Version: iPhone OS 6.0.1 (10A523)
Report Version: 104
Exception Type: SIGTRAP
Exception Codes: #0 at 0x3abd62be
Crashed Thread: 0
Thread 0 Crashed:
0 CoreFoundation 0x363582be CFRelease + 18
1 WebCore 0x383de395 WebCore::stopSharedTimer() + 33
2 WebCore 0x38433515 WebCore::TimerBase::~TimerBase() + 45
3 WebCore 0x3846003b WebCore::Document::~Document() + 2751
4 WebCore 0x3845f56d WebCore::HTMLDocument::~HTMLDocument() + 81
5 WebCore 0x384e9473 WebCore::JSNodeOwner::finalize(JSC::Handle<JSC::Unknown>, void*) + 79
6 JavaScriptCore 0x321e2067 JSC::WeakBlock::sweep() + 87
7 JavaScriptCore 0x321e22ad JSC::WeakSet::sweep() + 53
8 JavaScriptCore 0x3213d877 JSC::Heap::collect(JSC::Heap::SweepToggle) + 175
9 JavaScriptCore 0x3213cad9 JSC::DefaultGCActivityCallbackPlatformData::timerDidFire(__CFRunLoopTimer*, void*) + 145
10 CoreFoundation 0x363ec5df __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 15
11 CoreFoundation 0x363ec291 __CFRunLoopDoTimer + 273
12 CoreFoundation 0x363eaf01 __CFRunLoopRun + 1233
13 CoreFoundation 0x3635debd CFRunLoopRunSpecific + 357
14 CoreFoundation 0x3635dd49 CFRunLoopRunInMode + 105
15 GraphicsServices 0x3490e2eb GSEventRunModal + 75
16 UIKit 0x37b2b2f9 UIApplicationMain + 1121
17 MyApp 0x00003927 main (main.m:20)
Thread 5:
0 libsystem_kernel.dylib 0x3681feb4 mach_msg_trap + 20
1 CoreFoundation 0x363ec045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x363eada3 __CFRunLoopRun + 883
3 CoreFoundation 0x3635debd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x3635dd49 CFRunLoopRunInMode + 105
5 Foundation 0x307f978f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 255
6 Foundation 0x3089d05d -[NSRunLoop(NSRunLoop) run] + 81
7 MyApp 0x000c3225 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:157)
8 Foundation 0x308a667d __NSThread__main__ + 973
9 libsystem_c.dylib 0x33ab5311 _pthread_start + 309
Thread 6:
0 libsystem_kernel.dylib 0x3681feb4 mach_msg_trap + 20
1 CoreFoundation 0x363ec045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x363eada3 __CFRunLoopRun + 883
3 CoreFoundation 0x3635debd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x3635dd49 CFRunLoopRunInMode + 105
5 Foundation 0x30822bcd +[NSURLConnection(Loader) _resourceLoadLoop:] + 309
6 Foundation 0x308a667d __NSThread__main__ + 973
7 libsystem_c.dylib 0x33ab5311 _pthread_start + 309
Thread 7:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 8:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 10:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 13:
0 libsystem_kernel.dylib 0x3682239c pread + 20
1 libsqlite3.dylib 0x33978109 sqlite3_get_table + 125
2 libsqlite3.dylib 0x339772a7 sqlite3_get_table + 125
3 libsqlite3.dylib 0x33d25fb1 0x33cde000 + 294833
4 libsqlite3.dylib 0x33d13807 0x33cde000 + 219143
5 libsqlite3.dylib 0x33d0d49d 0x33cde000 + 193693
6 libsqlite3.dylib 0x3398648f sqlite3_step + 2143
7 CFNetwork 0x3138276b __CFURLCache::DoBulkLookupAndStoreBasedOnTime(__CFString const*) + 459
8 CFNetwork 0x313c4667 __ExecuteSQLSelectAndCreateResponse_block_invoke_0 + 35
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 17:
0 libsystem_kernel.dylib 0x3683008c __psynch_cvwait + 24
1 libsystem_c.dylib 0x33aadaa5 pthread_cond_timedwait + 45
2 JavaScriptCore 0x320d6c75 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 109
3 JavaScriptCore 0x321e8557 JSC::BlockAllocator::blockFreeingThreadMain() + 83
4 JavaScriptCore 0x321fafab _ZN3WTFL19wtfThreadEntryPointEPv + 15
5 libsystem_c.dylib 0x33ab5311 _pthread_start + 309
Thread 18:
0 libsystem_kernel.dylib 0x3683008c __psynch_cvwait + 24
1 libsystem_c.dylib 0x33ab7f19 pthread_cond_wait + 41
2 JavaScriptCore 0x3217bf41 JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode) + 149
3 JavaScriptCore 0x3217be81 JSC::MarkStackThreadSharedData::markingThreadMain() + 145
4 JavaScriptCore 0x321fafab _ZN3WTFL19wtfThreadEntryPointEPv + 15
5 libsystem_c.dylib 0x33ab5311 _pthread_start + 309
Thread 22:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 25:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 43:
0 libsystem_kernel.dylib 0x3682239c pread + 20
1 libsqlite3.dylib 0x33978109 sqlite3_get_table + 125
2 libsqlite3.dylib 0x339772a7 sqlite3_get_table + 125
3 libsqlite3.dylib 0x33d25fb1 0x33cde000 + 294833
4 libsqlite3.dylib 0x33d13807 0x33cde000 + 219143
5 libsqlite3.dylib 0x33d0d49d 0x33cde000 + 193693
6 libsqlite3.dylib 0x3398648f sqlite3_step + 2143
7 CFNetwork 0x3138276b __CFURLCache::DoBulkLookupAndStoreBasedOnTime(__CFString const*) + 459
8 CFNetwork 0x313c4667 __ExecuteSQLSelectAndCreateResponse_block_invoke_0 + 35
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 44:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x31382619 __CFURLCache::DoBulkLookupAndStoreBasedOnTime(__CFString const*) + 121
2 CFNetwork 0x313c4667 __ExecuteSQLSelectAndCreateResponse_block_invoke_0 + 35
3 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
4 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
5 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
6 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 47:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 49:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 50:
0 libsystem_kernel.dylib 0x368300fc __psynch_mutexwait + 24
1 CFNetwork 0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2 CFNetwork 0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3 CFNetwork 0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4 CFNetwork 0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5 CFNetwork 0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6 CFNetwork 0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7 CFNetwork 0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8 CFNetwork 0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9 libdispatch.dylib 0x3807711f _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3807b961 _dispatch_root_queue_drain + 253
11 libdispatch.dylib 0x3807bac1 _dispatch_worker_thread2 + 85
12 libsystem_c.dylib 0x33aaaa11 _pthread_wqthread + 361
Thread 51:
0 libsystem_kernel.dylib 0x36830d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x33aaaa16 _pthread_wqthread + 366
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x5df80157 r2: 0x1ddd4000 r3: 0x38596026
r4: 0x3be2c86c r5: 0x00000000 r6: 0x00000000 r7: 0x2fd1be1c
r8: 0x00000000 r9: 0x00293498 r10: 0x00388800 r11: 0x04432d90
ip: 0x3bd68a50 sp: 0x2fd1bde8 lr: 0x368ba395 pc: 0x3abd62be
cpsr: 0x60000030
I´m basically using an AFJSONRequestOperation in a UIViewController, which has been pushed onto a NavigationController to fetch a JSON it display its contents.
Is it AFNetworking that´s causing the crash (in Thread 5)? Or could it be a flaw in my code? I´m really stuck and it happens quite often. Any help or questions very much appreciated!
Its not a problem with Thread 5 according to the crash; it is a problem in Thread 0.
Brian in his blog posting adds some background information on how the timer operates in webkit.
http://brrian.tumblr.com/post/13951629341/how-webkits-event-model-works
Its interesting that the problem OS is 6.0.1, not the newer version 6.1, nor 7.x (as of the time of writing).
The crash happens during a CFRelease, and this tends to happen when a resource has already been released is released. My suggestion is to see if the problem happens on any newer OS as it sounds like a WebKit bug. Webkit is the code responsible for the timer.
The timer code has been re-worked anyhow:
https://trac.webkit.org/changeset/143210
So I think the best option is to look to see if the newest iOS ever has this crash, or the newest 6.x (6.1).
Failing this, and assuming you cannot reproduce the problem, since you have networking queries (and DB queries) going on, the classic way timers come into the picture is when you have slow/unreliable network connection. Use Apple's Network Link Conditioner to simulate such conditions. This might show up the problem in WebKit.
Check if some ad opened the iTunes. Maybe you are opening too many threads in the initialization of your application. You can try to enqueue these requests. Just random thoughts..

Resources