Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crash on Error Code: -1001 Error: NSURLErrorTimedOut

I am having the following crash (0.05% crash rate, so I have yet to reproduce it):

0   libdispatch.dylib 0x208b2028 _dispatch_semaphore_signal_slow + 174
!   1   MyProject 0x00253f39 __64-[CRNSURLSessionTaskProxy wrapDataCompletionHandler:forSession:]_block_invoke + 422
2   CFNetwork 0x2120796d __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 14
3   CFNetwork 0x21216ef7 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 276
4   Foundation 0x2150a52d __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 6
5   Foundation 0x2146beff -[NSBlockOperation main] + 144
6   Foundation 0x2145e2ef -[__NSOperationInternal _start:] + 772
7   Foundation 0x2150c7ed __NSOQSchedule_f + 190
8   libdispatch.dylib 0x208adf97 _dispatch_queue_drain + 1760
9   libdispatch.dylib 0x208a6f2f _dispatch_queue_invoke + 280
10  libdispatch.dylib 0x208af325 _dispatch_root_queue_drain + 398
11  libdispatch.dylib 0x208af193 _dispatch_worker_thread3 + 92
12  libsystem_pthread.dylib 0x20a3ce0d _pthread_wqthread + 1022
13  libsystem_pthread.dylib 0x20a3c9fc start_wqthread + 6

The crashes only appears on iOS9, none whatsoever on iOS8, but this could just be a coincidence. I am also seeing this via Crittercism breadcrumbs:

enter image description here

I am also using Background Fetches which do hit the network layer.

Any idea why this is happing?

like image 819
Rui Peres Avatar asked Jan 22 '16 15:01

Rui Peres


1 Answers

This looks to me like a bug with Crittercism. The class CRNSURLSessionTaskProxy is a Crittercism class (see below), so it's crashing in their code, which is corroborated by the errors in the Crittercism breadcrumbs.

The only Google hit (other than this question) for the class name is this one. If you look at the other classes in that dump that start with CR, you will see CRBreadcrumbs and CRCrash.

Also here's a dump of the Crittercism framework in the Hopper disassembler:

enter image description here

Pretty conclusive I would say.

like image 189
mluisbrown Avatar answered Nov 17 '22 12:11

mluisbrown