Crash By CFNetwork In iOS13

There Many Crash Report Like this, But no any code about my business can tell me why, so I think this is a system bug, Who can tell me why and how to avoid it?

Thread 19 Crashed:
0   CoreFoundation                  __exceptionPreprocess  +224
1   libobjc.A.dylib                 objc_exception_throw  +56
2   CoreFoundation                  -[__NSSingleObjectEnumerator initWithObject:collection:]  +0
3   CFNetwork                       _CFHTTPServerResponseEnqueue  +24424
4   CFNetwork                       _CFHTTPServerResponseEnqueue  +22476
5   CFNetwork                       _CFHTTPServerResponseEnqueue  +31004
6   CFNetwork                       _CFHTTPMessageSetResponseProxyURL  +8652
7   CFNetwork                       0x00000001a09a6138 0x1a09a1000 + 20792
8   CFNetwork                       CFURLDownloadCancel  +35396
9   CFNetwork                       CFURLDownloadCancel  +29408
10  CFNetwork                       0x00000001a09aa444 0x1a09a1000 + 37956
11  CFNetwork                       0x00000001a09a7cf0 0x1a09a1000 + 27888
12  CFNetwork                       CFURLDownloadCancel  +41784
13  libdispatch.dylib               _dispatch_block_async_invoke2  +104
14  libdispatch.dylib               _dispatch_client_callout  +16
15  libdispatch.dylib               _dispatch_lane_serial_drain$VARIANT$mp  +608
16  libdispatch.dylib               _dispatch_lane_invoke$VARIANT$mp  +464
17  libdispatch.dylib               _dispatch_workloop_worker_thread  +588
18  libsystem_pthread.dylib         _pthread_wqthread  +272
19  libsystem_pthread.dylib         start_wqthread  +8

I have sent the crash file here, that i removed some information about my app

Post not yet marked as solved Up vote post of Jerrydu Down vote post of Jerrydu
146 views

Replies

this crash only occur in iOS13.1.3~13.5.1, But I didn't see any change about CFNetwork here

App May Execute this code many times, May this is the problem about this crash?

NSURL *url = [NSURL URLWithString:hostString];
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
  [request setAllHTTPHeaderFields:header];
   
  NSURLSessionConfiguration *sessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration];
  sessionConfiguration.timeoutIntervalForRequest = MAXFLOAT;
  self.session = [NSURLSession sessionWithConfiguration:sessionConfiguration delegate:self delegateQueue:_operationQueue];
  NSURLSessionWebSocketTask *webSocketTask = [self.session webSocketTaskWithRequest:request];