iOS 13.1 (17A5831c) crashes in dispatch_group_async

I'm seeing a consistent crash on iOS 13.1 (17A5831c) only when AFNetworking has multiple tasks running in parallel.


Crash report says:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001b9f0dadc
Triggered by Thread:  0


Application Specific Information:
Corrupt NSInvocation detected.


Stacktrace when debugging is:

Thread 1 Queue : com.apple.main-thread (serial)
#0 0x00000001957e8460 in OUTLINED_FUNCTION_0 ()
#1 0x0000000195841238 in -[NSInvocation dealloc].cold.1 ()
Enqueued from com.alamofire.networking.session.manager.processing (Thread 15) Queue : com.alamofire.networking.session.manager.processing (serial)
#0 0x000000010f2febf0 in _dispatch_introspection_queue_item_enqueue_hook ()
#1 0x000000010f2ccac8 in dispatch_group_async ()
#2 0x00000001050cb3c0 in __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke.147 ()


A bit stuck here, and can't use DTS for beta.

Replies

did you create your instance by '[NSInvocation alloc]'?

I met similar issue on macOS 10.15 beta 8 today.


checked the API: https://developer.apple.com/documentation/foundation/nsinvocation/1437844-invocationwithmethodsignature?language=objc


you should use

+ (NSInvocation *)invocationWithMethodSignature:(NSMethodSignature *)sig;

to create your instance instead of alloc/init.

Does it crash with IOS 13.1 release ? If so, you can use a DTS now.