8

My iOS app uses AFNetworking (2.6.1), and my highest ranking crash is :

Crashed: com.apple.NSURLSession-work
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0004000128ab38a0

This is how most stack traces look like in Crashlytics:

Thread : Crashed: com.apple.NSURLSession-work
0  libobjc.A.dylib                0x180e29bc8 objc_msgSend + 8
1  CFNetwork                      0x181df6518 SessionConnectionLoadable::_loaderClientEvent_DidReceiveConnectionCacheKey(HTTPConnectionCacheKey*) + 56
2  CFNetwork                      0x181e75178 ___ZN19URLConnectionLoader36protocolDidReceiveConnectionCacheKeyEP22HTTPConnectionCacheKey_block_invoke + 40
3  libdispatch.dylib              0x1811fd630 _dispatch_call_block_and_release + 24
4  libdispatch.dylib              0x1811fd5f0 _dispatch_client_callout + 16
5  libdispatch.dylib              0x181209634 _dispatch_queue_drain + 864
6  libdispatch.dylib              0x1812010f4 _dispatch_queue_invoke + 464
7  libdispatch.dylib              0x18120b504 _dispatch_root_queue_drain + 728
8  libdispatch.dylib              0x18120b224 _dispatch_worker_thread3 + 112
9  libsystem_pthread.dylib        0x181411470 _pthread_wqthread + 1092
10 libsystem_pthread.dylib        0x181411020 start_wqthread + 4

I don't use kvo, and my app uses location and stays in the background at all times.

Any ideas on how to debug / recreate (I can't manage to recreate the issue in a simulator or on a device) ? Even catching the exception, without knowing where it is or how to handle it correctly would suffice in this case...

Jony Shlomoff
  • 349
  • 1
  • 9
  • Check this link to how create an Exception breakpoint, it will point the line that is causing the crash http://stackoverflow.com/questions/17802662/exception-breakpoint-in-xcode – Ulysses Feb 14 '16 at 01:12
  • If only I could recreate it in a simulator / device - that would help, but I get these crashes via Crashlytics as they only happen "in the wild" – Jony Shlomoff Feb 14 '16 at 01:40
  • 1
    @UlyssesR `EXC_BAD_ACCESS` *is not a thrown exception*. An exception backtrace will never work for that kind of crash. – bbum Feb 14 '16 at 02:59
  • Hi, having a very similar issue. https://github.com/AFNetworking/AFNetworking/issues/3530 is any of you using backgroundFetch and might consider that this crash is done while app NOT in foreground? Also this link might help https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html – Giorgos Ath Aug 22 '16 at 09:04
  • this issue only seems to happen on iOS 9 and not on iOS 10 – user102008 Oct 18 '16 at 20:20

0 Answers0