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!
Related
I am getting EXC_BREAKPOINT crash that occurs in the AVAudioSession Notify Thread. its happends in IOS 12 and 13 only, How to handle this?
Please have a look at crashlytics logs for more info from Firebase .
Crashed: AVAudioSession Notify Thread
0 WebKit 0x18a6b4430 WTFCrashWithInfo(int, char const*, char const*, int) + 20
1 WebKit 0x18a934484 WebKit::CallbackMap::put(WTF::Ref<WebKit::CallbackBase, WTF::DumbPtrTraits<WebKit::CallbackBase> >&&) + 312
2 WebKit 0x18a92681c WebKit::CallbackID WebKit::CallbackMap::put<API::SerializedScriptValue*, WTF::Optional<WebCore::ExceptionDetails>, WebKit::CallbackBase::Error>(WTF::Function<void (API::SerializedScriptValue*, WTF::Optional<WebCore::ExceptionDetails>, WebKit::CallbackBase::Error)>&&, WTF::Variant<std::nullptr_t, WTF::UniqueRef<WebKit::ProcessThrottler::Activity<(WebKit::ProcessThrottler::ActivityType)0> >, WTF::UniqueRef<WebKit::ProcessThrottler::Activity<(WebKit::ProcessThrottler::ActivityType)1> > >&&) + 112
3 WebKit 0x18a9266a4 WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld(WebCore::RunJavaScriptParameters&&, WTF::Optional<WTF::String> const&, WTF::Function<void (API::SerializedScriptValue*, WTF::Optional<WebCore::ExceptionDetails>, WebKit::CallbackBase::Error)>&&) + 176
4 WebKit 0x18a9265bc WebKit::WebPageProxy::runJavaScriptInMainFrame(WebCore::RunJavaScriptParameters&&, WTF::Function<void (API::SerializedScriptValue*, WTF::Optional<WebCore::ExceptionDetails>, WebKit::CallbackBase::Error)>&&) + 32
5 WebKit 0x18a879680 -[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:completionHandler:] + 548
6 VIsualVoiceMail Production 0x1020e8d50 ViewController.audioRouteChanged() + 4363767120 (<compiler-generated>:4363767120)
7 VIsualVoiceMail Production 0x1020e9538 #objc ViewController.audioRouteChanged() + 4363769144 (<compiler-generated>:4363769144)
8 CoreFoundation 0x1830d0504 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
9 CoreFoundation 0x1830d054c ___CFXRegistrationPost1_block_invoke + 64
10 CoreFoundation 0x1830cf8a4 _CFXRegistrationPost1 + 368
11 CoreFoundation 0x1830cf57c ___CFXNotificationPost_block_invoke + 88
12 CoreFoundation 0x18304c2d4 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1412
13 CoreFoundation 0x1830ceedc _CFXNotificationPost + 1236
14 Foundation 0x18343c974 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
15 AVFAudio 0x18feec104 avfaudio::AVAudioSessionPropertyListener(void*, unsigned int, unsigned int, void const*) + 2640
16 AudioToolbox 0x18e3b5484 AudioSessionPropertyListeners::CallPropertyListeners(unsigned int, unsigned int, void const*) + 596
17 AudioToolbox 0x18e4098b0 HandleCFPropertyListChange(unsigned int, unsigned int, unsigned long, unsigned char*, unsigned int) + 696
18 AudioToolbox 0x18e40f468 HandleAudioSessionCFTypePropertyChangedMessage(unsigned int, unsigned int, void*, unsigned int) + 328
19 AudioToolbox 0x18e40eb80 ProcessDeferredMessage(unsigned int, __CFData const*, unsigned int, unsigned int) + 1620
20 AudioToolbox 0x18e40e17c ASCallbackReceiver_AudioSessionPingMessage + 632
21 AudioToolbox 0x18e47c398 _XAudioSessionPingMessage + 44
22 libAudioToolboxUtility.dylib 0x18e50f430 mshMIGPerform + 264
23 CoreFoundation 0x1830f3174 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
24 CoreFoundation 0x1830f2880 __CFRunLoopDoSource1 + 444
25 CoreFoundation 0x1830ed634 __CFRunLoopRun + 1888
26 CoreFoundation 0x1830ecba8 CFRunLoopRunSpecific + 424
27 AVFAudio 0x18fec3a2c GenericRunLoopThread::Entry(void*) + 156
28 AVFAudio 0x18ff147a0 CAPThread::Entry(CAPThread*) + 204
29 libsystem_pthread.dylib 0x182e8ad98 _pthread_start + 156
30 libsystem_pthread.dylib 0x182e8e74c thread_start + 8
getting lots of crashes as below in ios11: any idea what could be reason behind it. its happening in ios11 only. webkit framework is included in project.
Crashed: WebThread
0 JavaScriptCore 0x18d513a2c bmalloc::Heap::allocateLarge(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, unsigned long) + 24
1 JavaScriptCore 0x18d513a20 bmalloc::Heap::allocateLarge(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, unsigned long) + 12
2 JavaScriptCore 0x18d5112a0 bmalloc::Allocator::allocateLarge(unsigned long) + 92
3 JavaScriptCore 0x18cb6bef4 WTF::fastMalloc(unsigned long) + 112
4 JavaScriptCore 0x18d11e6a8 JSC::Heap::addExecutable(JSC::ExecutableBase*) + 352
5 JavaScriptCore 0x18d10a288 JSC::FunctionExecutable::finishCreation(JSC::VM&) + 48
6 JavaScriptCore 0x18d44f7cc JSC::UnlinkedFunctionExecutable::link(JSC::VM&, JSC::SourceCode const&, std::optional<int>, JSC::Intrinsic) + 280
7 JavaScriptCore 0x18d207860 JSC::functionPrototypeApplyCodeGenerator(JSC::VM&) + 64
8 JavaScriptCore 0x18d10d81c JSC::FunctionPrototype::addFunctionProperties(JSC::ExecState*, JSC::JSGlobalObject*, JSC::JSFunction**, JSC::JSFunction**, JSC::JSFunction**) + 156
9 JavaScriptCore 0x18d21a9f8 JSC::JSGlobalObject::init(JSC::VM&) + 1300
10 JavaScriptCore 0x18d224898 JSC::JSGlobalObject::finishCreation(JSC::VM&, JSC::JSObject*) + 144
11 WebCore 0x18e015590 WebCore::JSDOMGlobalObject::finishCreation(JSC::VM&, JSC::JSObject*) + 24
12 WebCore 0x18e850840 WebCore::JSDOMWindowBase::finishCreation(JSC::VM&, WebCore::JSDOMWindowProxy*) + 44
13 WebCore 0x18e7d28ac WebCore::JSDOMWindow::finishCreation(JSC::VM&, WebCore::JSDOMWindowProxy*) + 36
14 WebCore 0x18e8548a4 WebCore::JSDOMWindowProxy::setWindow(WTF::RefPtr<WebCore::DOMWindow>&&) + 516
15 WebCore 0x18eed505c WebCore::ScriptController::setDOMWindowForWindowProxy(WebCore::DOMWindow*) + 360
16 WebCore 0x18dfed904 WebCore::FrameLoader::clear(WebCore::Document*, bool, bool, bool) + 476
17 WebCore 0x18e3a42c8 WebCore::DocumentWriter::begin(WebCore::URL const&, bool, WebCore::Document*) + 368
18 WebCore 0x18dfebb58 WebCore::DocumentLoader::commitData(char const*, unsigned long) + 176
19 WebKitLegacy 0x18f3d3bd8 -[WebHTMLRepresentation receivedData:withDataSource:] + 112
20 WebKitLegacy 0x18f3d3af8 -[WebDataSource(WebInternal) _receivedData:] + 68
21 WebKitLegacy 0x18f3d3a98 WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) + 112
22 WebCore 0x18e0099c4 WebCore::DocumentLoader::commitLoad(char const*, int) + 172
23 WebCore 0x18e008bec WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction) + 1796
24 WebCore 0x18e3930a0 WebCore::DocumentLoader::responseReceived(WebCore::ResourceResponse const&) + 1820
25 WebCore 0x18e392004 WebCore::DocumentLoader::handleSubstituteDataLoadNow() + 308
26 WebCore 0x18dfaf000 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
27 WebCore 0x18dfaef40 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
28 CoreFoundation 0x186152fc0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
29 CoreFoundation 0x186152ce4 __CFRunLoopDoTimer + 864
30 CoreFoundation 0x1861524e4 __CFRunLoopDoTimers + 248
31 CoreFoundation 0x1861500cc __CFRunLoopRun + 1928
32 CoreFoundation 0x18606fe58 CFRunLoopRunSpecific + 436
33 WebCore 0x18dfe0a34 RunWebThread(void*) + 560
34 libsystem_pthread.dylib 0x185dd02b4 _pthread_body + 308
35 libsystem_pthread.dylib 0x185dd0180 _pthread_body + 310
36 libsystem_pthread.dylib 0x185dceb74 thread_start + 4
I'm trying to fix the crash issue of a mac app. It's using the web view.
I got the report from fabric but I have no idea how to fix it.
Any suggestion?
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000bbadbeef
Crashed: com.apple.main-thread
0 JavaScriptCore 0x7fff8d7a232e WTFCrash + 62
1 WebCore 0x7fff879ca13d WebCore::DocumentLoader::detachFromFrame() + 269
2 WebKitLegacy 0x7fff866f1f7e WebDocumentLoaderMac::detachFromFrame() + 14
3 WebCore 0x7fff87945178 WebCore::FrameLoader::setDocumentLoader(WebCore::DocumentLoader*) + 104
4 WebCore 0x7fff87ed90a0 WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) + 208
5 WebCore 0x7fff87944a3d WebCore::FrameLoader::commitProvisionalLoad() + 397
6 WebCore 0x7fff879e568d WebCore::DocumentLoader::commitLoad(char const*, int) + 77
7 WebCore 0x7fff879e5254 WebCore::DocumentLoader::dataReceived(WebCore::CachedResource*, char const*, int) + 292
8 WebCore 0x7fff879e4f51 WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) + 177
9 WebCore 0x7fff879e4b2a WebCore::CachedRawResource::addDataBuffer(WebCore::ResourceBuffer*) + 170
10 WebCore 0x7fff879e4802 WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::PassRefPtr<WebCore::SharedBuffer>, long long, WebCore::DataPayloadType) + 210
11 WebCore 0x7fff87a08b0c WebCore::SubresourceLoader::didReceiveBuffer(WTF::PassRefPtr<WebCore::SharedBuffer>, long long, WebCore::DataPayloadType) + 44
12 WebCore 0x7fff87a08a4a WebCore::ResourceLoader::didReceiveBuffer(WebCore::ResourceHandle*, WTF::PassRefPtr<WebCore::SharedBuffer>, int) + 90
13 WebCore 0x7fff87a08985 -[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:] + 101
14 CFNetwork 0x7fff8552c81d __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 69
15 CFNetwork 0x7fff8552c681 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 232
16 CFNetwork 0x7fff8552c587 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
17 CFNetwork 0x7fff85538f74 _NSURLConnectionDidReceiveData_LengthReceived(_CFURLConnection*, __CFData const*, long, void const*) + 83
18 CFNetwork 0x7fff8552cf3b ___ZN27URLConnectionClient_Classic29_delegate_didReceiveDataArrayEv_block_invoke + 297
19 CFNetwork 0x7fff855e14a3 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 94
20 CFNetwork 0x7fff8547feec RunloopBlockContext::_invoke_block(void const*, void*) + 72
21 CoreFoundation 0x7fff9122c664 CFArrayApplyFunction + 68
22 CFNetwork 0x7fff8547fdad RunloopBlockContext::perform() + 133
23 CFNetwork 0x7fff8547fb98 MultiplexerSource::perform() + 282
24 CFNetwork 0x7fff8547f9ba MultiplexerSource::_perform(void*) + 72
25 CoreFoundation 0x7fff91260a01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26 CoreFoundation 0x7fff91252b8d __CFRunLoopDoSources0 + 269
27 CoreFoundation 0x7fff912521bf __CFRunLoopRun + 927
28 CoreFoundation 0x7fff91251bd8 CFRunLoopRunSpecific + 296
29 HIToolbox 0x7fff82b9356f RunCurrentEventLoopInMode + 235
30 HIToolbox 0x7fff82b932ea ReceiveNextEventCommon + 431
31 HIToolbox 0x7fff82b9312b _BlockUntilNextEventMatchingListInModeWithFilter + 71
32 AppKit 0x7fff8acc88ab _DPSNextEvent + 978
33 AppKit 0x7fff8acc7e58 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
34 AppKit 0x7fff8acbdaf3 -[NSApplication run] + 594
35 AppKit 0x7fff8ac3a244 NSApplicationMain + 1832
36 libdyld.dylib 0x7fff896af5c9 start + 1
above is the log. Any idea why it happens and how to fix it?
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?
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..