Crash in only iOS 11.

We have an app that is working just fine in iOS 10 and previous version, but crashes in iOS 11.

It happens pretty frequently.

I found crash log in Fabric Crashlytisc.

Here it is.


#1. Crashed: com.apple.NSURLSession-work

0 CFNetwork 0x1840bd954 HTTPParser::HTTPParser(__CFAllocator const*, HTTPParserClient*, HTTPParser*) + 44

1 CFNetwork 0x183fa0a70 HTTPMessage::commonInitialization(unsigned char, HTTPMessage const*) + 212

2 CFNetwork 0x183fa0a70 HTTPMessage::commonInitialization(unsigned char, HTTPMessage const*) + 212

3 CFNetwork 0x183fa0c10 HTTPMessage::HTTPMessage(HTTPMessage const*) + 112

4 CFNetwork 0x1840bead8 HTTPRequestMessage::HTTPRequestMessage(HTTPRequestMessage const*) + 36

5 CFNetwork 0x183f7fe00 HTTPRequest::HTTPRequest(HTTPRequest const*) + 24

6 CFNetwork 0x183f82540 URLRequest::initialize(URLRequest const*, unsigned char) + 656

7 CFNetwork 0x183f382f8 _createRequestCopy(__CFAllocator const*, _CFURLRequest const*, unsigned char) + 144

8 CFNetwork 0x1840a8b20 -[NSURLRequest mutableCopyWithZone:] + 44

9 CFNetwork 0x183efacfc -[__NSCFLocalSessionTask _onqueue_strippedMutableRequest] + 40

10 CFNetwork 0x183ee50b4 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke.258 + 40

11 CFNetwork 0x183efd87c -[__NSCFLocalSessionTask _onqueue_completeInitialization] + 72

12 CFNetwork 0x184121db0 __30-[__NSCFURLSessionTask resume]_block_invoke + 40

13 libdispatch.dylib 0x1832dd088 _dispatch_call_block_and_release + 24

14 libdispatch.dylib 0x1832dd048 _dispatch_client_callout + 16

15 libdispatch.dylib 0x1832e6e48 _dispatch_queue_serial_drain$VARIANT$mp + 528

16 libdispatch.dylib 0x1832e77d8 _dispatch_queue_invoke$VARIANT$mp + 340

17 libdispatch.dylib 0x1832e8200 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400

18 libdispatch.dylib 0x1832f04a0 _dispatch_workloop_worker_thread$VARIANT$mp + 644

19 libsystem_pthread.dylib 0x183582fd0 _pthread_wqthread + 932

20 libsystem_pthread.dylib 0x183582c20 start_wqthread + 4


Plz, could you give some advice?

Accepted Reply

Might want to take the advice to 'run your app with zombies and the address sanitizer' as suggested in this previous thread:


https://forums.developer.apple.com/thread/69645

Replies

Might want to take the advice to 'run your app with zombies and the address sanitizer' as suggested in this previous thread:


https://forums.developer.apple.com/thread/69645

Hi woncheolHeo,


Looks like you've resolved the issue. What was the cause?


I got the same stack trace for one of my application, but could not reproduce the crash. sanitizer/zombies don't really help me