Crash in CFNetwork CFAllocatedReferenceCountedObject::_retainable_hash(void const*) - ios

Crash logs:
1 CRASH
1 USER
CFNetwork
CFAllocatedReferenceCountedObject::_retainable_hash(void const*)
Crashed: com.apple.CFNetwork.LoaderQ
0 CFNetwork 0x183985310 CFAllocatedReferenceCountedObject::_retainable_hash(void const*) + 26
1 CoreFoundation 0x18321e160 CFBasicHashFindBucket + 164
2 CoreFoundation 0x18321e0a0 CFDictionaryGetValue
+ 224
3 CFNetwork 0x1839b5a4c TubeManager::_onqueue_enqueueRequestForProtocol(MetaConnectionCacheClient*, HTTPRequestMessage const*, MetaConnectionOptions, BaseAwaitingTube*) + 80
4 CFNetwork 0x1839b69b4 TubeManager::_onqueue_reenqueueAwaitingTube(BaseAwaitingTube*) + 112
5 CFNetwork 0x1839b6c14 invocation function for block in TubeManager::_onqueue_newTubeReady(Tube*, CFStreamError) + 28
6 CFNetwork 0x183b152e4 invocation function for block in QCoreSchedulingSet::performAsync(void () block_pointer) const
+ 52
7 libdispatch.dylib 0x182cdea54 _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x182cdea14 _dispatch_client_callout + 16
9 libdispatch.dylib 0x182ce896c _dispatch_queue_serial_drain$VARIANT$mp + 528
10 libdispatch.dylib 0x182ce92fc
_dispatch_queue_invoke$VARIANT$mp + 340
11 libdispatch.dylib 0x182ce8824 _dispatch_queue_serial_drain$VARIANT$mp + 200
12 libdispatch.dylib 0x182ce92fc
_dispatch_queue_invoke$VARIANT$mp + 340
13 libdispatch.dylib 0x182ce9d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
14 libdispatch.dylib 0x182cf203c
_dispatch_workloop_worker_thread$VARIANT$mp + 644
15 libsystem_pthread.dylib 0x182f86f1c _pthread_wqthread + 932
16 libsystem_pthread.dylib 0x182f86b6c start_wqthread + 4
IOS versions:
11.2.6
11.2.2
11.2.1
Devices:
iPhone 6
iPhone 6S plus
iPad mini 2
Does somebody know why this error occurs and how to solve it?
Please help

Related

CFNetwork.Connection crashed

My iOS app had a crash caused by CFNetwork. I cannot reproduce it. The app was running on iOS 12. I am using Alamofire to perform HTTP requests, but I don't think it was caused by Alamofire. Anyone has any idea?
Crashed: com.apple.CFNetwork.Connection
0 libsystem_kernel.dylib 0x1ba289104 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1ba308a00 pthread_kill$VARIANT$armv81 + 296
2 libsystem_c.dylib 0x1ba1e0d78 abort + 140
3 libsystem_c.dylib 0x1ba1ae67c basename_r + 314
4 CFNetwork 0x1bae63478 invocation function for block in TCPIOConnection::_tlsValidateServerTrust(nw_tls_context*) + 346
5 CFNetwork 0x1bae614e0 TCPIOConnection::_handleTLSEvent(nw_tls_context*, tls_handshake_message_t, void () block_pointer, bool) + 720
6 libnetwork.dylib 0x1bb8716b0 __tcp_connection_set_tls_message_handler_on_nw_connection_block_invoke + 168
7 libboringssl.dylib 0x1bb5e505c __boringssl_context_issue_tls_handshake_callback_block_invoke + 188
8 libdispatch.dylib 0x1ba12b6c8 _dispatch_call_block_and_release + 24
9 libdispatch.dylib 0x1ba12c484 _dispatch_client_callout + 16
10 libdispatch.dylib 0x1ba106fb0 _dispatch_lane_serial_drain$VARIANT$armv81 + 548
11 libdispatch.dylib 0x1ba107b2c _dispatch_lane_invoke$VARIANT$armv81 + 468
12 libdispatch.dylib 0x1ba108d70 _dispatch_workloop_invoke$VARIANT$armv81 + 1892
13 libdispatch.dylib 0x1ba10ff14 _dispatch_workloop_worker_thread + 584
14 libsystem_pthread.dylib 0x1ba30e0f0 _pthread_wqthread + 312
15 libsystem_pthread.dylib 0x1ba310d00 start_wqthread + 4

iOS crash at CFAllocatedReferenceCountedObject

My app frequently crashes with the following information:
0 CFNetwork CFAllocatedReferenceCountedObject::_retainable_hash(void const*)
1 CoreFoundation _CFBasicHashFindBucket + 164
2 CoreFoundation CFDictionaryGetValue + 224
3 CFNetwork TubeManager::_onqueue_enqueueRequestForProtocol(MetaConnectionCacheClient*, HTTPRequestMessage const*, MetaConnectionOptions, BaseAwaitingTube*) + 80
4 CFNetwork TubeManager::_onqueue_reenqueueAwaitingTube(BaseAwaitingTube*) + 112
5 CFNetwork ___ZN11TubeManager21_onqueue_newTubeReadyEP4Tube13CFStreamError_block_invoke + 28
6 CFNetwork ___ZNK18QCoreSchedulingSet12performAsyncEU13block_pointerFvvE_block_invoke + 52
7 libdispatch.dylib __dispatch_call_block_and_release + 24
8 libdispatch.dylib __dispatch_client_callout + 16
9 libdispatch.dylib __dispatch_queue_serial_drain$VARIANT$mp + 528
10 libdispatch.dylib __dispatch_queue_invoke$VARIANT$mp + 340
11 libdispatch.dylib __dispatch_queue_serial_drain$VARIANT$mp + 200
12 libdispatch.dylib __dispatch_queue_invoke$VARIANT$mp + 340
13 libdispatch.dylib __dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
14 libdispatch.dylib __dispatch_workloop_worker_thread$VARIANT$mp + 644
15 libsystem_pthread.dylib _pthread_wqthread + 932
The crash device informations:
Who know how could this happen and how to solve the problem?

I am getting this crash, again and again from Crashlytics, but can't reproduce locally

Crashed: com.IPTV.TVLService.GuideProgramService
0 libobjc.A.dylib 0x182a05b90 objc_msgSend + 16
1 CoreFoundation 0x18326f654 CFBasicHashCreateCopy + 668
2 CoreFoundation 0x183291248 CFDictionaryCreateCopy + 148
3 CFNetwork 0x18396fa70 URLResponse::createArchiveList(__CFAllocator const*, long*, void const***, long*) + 228
4 CFNetwork 0x18396f764 URLResponse::copyPropertyList(__CFAllocator const*) + 68
5 CFNetwork 0x1839c1610 ___ZN12__CFURLCache23CreateAndStoreCacheNodeEP16__CFURLCacheNodePK20_CFCachedURLResponsePK10__CFStringPK13_CFURLRequestPKvbRb_block_invoke + 796
6 libdispatch.dylib 0x182dd94bc _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x182dd947c _dispatch_client_callout + 16
8 libdispatch.dylib 0x182de54c0 _dispatch_queue_drain + 864
9 libdispatch.dylib 0x182ddcf80 _dispatch_queue_invoke + 464
10 libdispatch.dylib 0x182de7390 _dispatch_root_queue_drain + 728
11 libdispatch.dylib 0x182de70b0 _dispatch_worker_thread3 + 112
12 libsystem_pthread.dylib 0x182ff1470 _pthread_wqthread + 1092
13 libsystem_pthread.dylib 0x182ff1020 start_wqthread + 4
I am new to iOS development.
How to understand what's causing issue? Please help me with any document or book that help me to learn solving this issues for future.
It seems like your app crashed in thread com.IPTV.TVLService.GuideProgramService and whether this thread is a custom thread or not?
Are you develop on tvOS?
There is something you should offer to make your question clear.

CFNetwork is crashed in iOS 7

Application is crashed sometimes with such trace, I can't reproduce it.
Thread 16 Crashed:
0 libobjc.A.dylib 0x3b0f4b26 objc_msgSend + 6
1 CFNetwork 0x308d9491 -[__NSCFLocalSessionTask setConnection:] + 718
2 CFNetwork 0x30933c33 -[__NSCFLocalSessionBridge taskTerminating:] + 136
3 CFNetwork 0x30932945 __64-[__NSCFLocalSessionBridge initWithConfiguration:session:queue:]_block_invoke + 46
4 CFNetwork 0x30950b03 ___ZNK24ClassicConnectionSession28_connection_didFinishLoadingEP16_CFURLConnection_block_invoke + 96
5 libdispatch.dylib 0x3b5dcd1b _dispatch_call_block_and_release + 8
6 libdispatch.dylib 0x3b5e3273 _dispatch_queue_drain$VARIANT$mp + 372
7 libdispatch.dylib 0x3b5e306b _dispatch_queue_invoke$VARIANT$mp + 40
8 libdispatch.dylib 0x3b5e3ce1 _dispatch_root_queue_drain + 74
9 libdispatch.dylib 0x3b5e3f59 _dispatch_worker_thread2 + 54
10 libsystem_pthread.dylib 0x3b71edbf _pthread_wqthread + 296
11 libsystem_pthread.dylib 0x3b71ec84 start_wqthread + 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