My app worked fine without any crash but after upgrading to Version 11.2.1 (11B500) many strange things happen, I tried the Version 11.3 beta (11C24b) without any success.
To remove any doubts related to my apps I can reproduce the crash starting a new clean project
- create the project for MacOS -> App
- language Objective-C and very important check
Create Document-Based Application
- run the application, the window application appears
- Open two other windows with the shortcut CMD+N
- close the app with CMD+Q
- the app crashes (see the stacktrace below)
I've tried with two different macs both with 10.14.6 so I think the problem is related to Xcode itself
Any hint?
2019-11-26 09:05:31.852866+0100 CrashEPoi[1918:173418] Metal API Validation Enabled
2019-11-26 09:05:34.169223+0100 CrashEPoi[1918:173418] *** _NSDocumentBasicAsyncOperation 0x60000024adc0 went isFinished=YES without being started by the queue it is in
2019-11-26 09:05:34.169398+0100 CrashEPoi[1918:173418] *** _NSDocumentBasicAsyncOperation 0x60000024b560 went isFinished=YES without being started by the queue it is in
2019-11-26 09:05:34.170040+0100 CrashEPoi[1918:173759] [General] An uncaught exception was raised
2019-11-26 09:05:34.170145+0100 CrashEPoi[1918:173759] [General] *** -[__NSOperationInternal _start:]: something is trying to start the receiver simultaneously from more than one thread
2019-11-26 09:05:34.170281+0100 CrashEPoi[1918:173759] [General] (
0 CoreFoundation 0x00007fff4d515bc9 __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff77cb93c6 objc_exception_throw + 48
2 CoreFoundation 0x00007fff4d5159fb +[NSException raise:format:] + 193
3 Foundation 0x00007fff4f6f0b19 -[__NSOperationInternal _start:] + 265
4 Foundation 0x00007fff4f71ac77 __NSOQSchedule_f + 227
5 libdispatch.dylib 0x0000000100345e7c _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x0000000100346f1b _dispatch_client_callout + 8
7 libdispatch.dylib 0x000000010034a2be _dispatch_continuation_pop + 563
8 libdispatch.dylib 0x00000001003493b4 _dispatch_async_redirect_invoke + 769
9 libdispatch.dylib 0x0000000100359824 _dispatch_root_queue_drain + 334
10 libdispatch.dylib 0x000000010035a2da _dispatch_worker_thread2 + 125
11 libsystem_pthread.dylib 0x00000001003c00b7 _pthread_wqthread + 583
12 libsystem_pthread.dylib 0x00000001003bfe01 start_wqthread + 13
)
2019-11-26 09:05:34.176607+0100 CrashEPoi[1918:173759] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSOperationInternal _start:]: something is trying to start the receiver simultaneously from more than one thread'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff4d515bc9 __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff77cb93c6 objc_exception_throw + 48
2 CoreFoundation 0x00007fff4d5159fb +[NSException raise:format:] + 193
3 Foundation 0x00007fff4f6f0b19 -[__NSOperationInternal _start:] + 265
4 Foundation 0x00007fff4f71ac77 __NSOQSchedule_f + 227
5 libdispatch.dylib 0x0000000100345e7c _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x0000000100346f1b _dispatch_client_callout + 8
7 libdispatch.dylib 0x000000010034a2be _dispatch_continuation_pop + 563
8 libdispatch.dylib 0x00000001003493b4 _dispatch_async_redirect_invoke + 769
9 libdispatch.dylib 0x0000000100359824 _dispatch_root_queue_drain + 334
10 libdispatch.dylib 0x000000010035a2da _dispatch_worker_thread2 + 125
11 libsystem_pthread.dylib 0x00000001003c00b7 _pthread_wqthread + 583
12 libsystem_pthread.dylib 0x00000001003bfe01 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)