Random crashes on Xcode 13

Installed beta 5 of Xcode 13.

Getting a lot of random crashes in different places of application (e.g):

Thread 8: EXC_BREAKPOINT (code=1, subcode=0x1c80eb414)

Here is instruction list:

libsystem_platform.dylib`_os_semaphore_dispose.cold.1:
    0x1c80eb3f0 <+0>:  sxtw   x8, w0
    0x1c80eb3f4 <+4>:  stp    x20, x21, [sp, #-0x10]!
    0x1c80eb3f8 <+8>:  adrp   x20, 0
    0x1c0eb3fc <+12>: add    x20, x20, #0xd52          ; =0xd52 
    0x1c80eb400 <+16>: adrp   x21, 75707
    0x1c80eb404 <+20>: add    x21, x21, #0x568          ; =0x568 
    0x1c80eb408 <+24>: str    x20, [x21, #0x8]
    0x1c80eb40c <+28>: str    x8, [x21, #0x38]
    0x1c80eb410 <+32>: ldp    x20, x21, [sp], #0x10
->  0x1c80eb414 <+36>: brk    #0x1

How can I find more info about this crash?

Env is : Mac mini M1 and Simulator.

Hi there! I see a few bug reports similar to this internally. Have you filed this already on feedback assistant? Also what macOS version are you running?

I'm running macOS Big Sur (11.3.1) on M1 Mac Mini Didn't created feedback because of official holiday in my country. Will try to do it today.

After some research my issue was found in release notes of iOS: https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15-beta-release-notes

Using dispatch semaphores in an iOS app running in a device simulator on a Mac with Apple silicon running macOS 11 will cause the app to crash. (81783378)

I'm using semaphore in my application, and that rings a bell into my head.

And there is workaround for it:

Workaround: In Xcode, select Product > Scheme > Edit Scheme, then deselect Run > Options > Queue Debugging > “Enable backtrace recording.”

After that everything seems to work normal.

Showing the code where the crash occurs would greatly help.

Hi there! I see a few bug reports similar to this internally. Have you filed this already on feedback assistant? Also what macOS version are you running?

I also have this exact issue on this code: https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/build_a_workout_app_for_apple_watch

Environment: MacBook Pro (13-inch, M1, 2020) Apple M1 macOS Big Sur 11.4 (20F71)

+1 Exact issue with exact same 11-line instruction set, starting with sxtw and crashing with brk. Xcode 13, Beta5, Simulator, Big Sur 11.5.2

Accepted Answer

Hi there! I see a few bug reports similar to this internally. Have you filed this already on feedback assistant? Also what macOS version are you running?

I'm running macOS Big Sur (11.3.1) on M1 Mac Mini Didn't created feedback because of official holiday in my country. Will try to do it today.

After some research my issue was found in release notes of iOS: https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15-beta-release-notes

Using dispatch semaphores in an iOS app running in a device simulator on a Mac with Apple silicon running macOS 11 will cause the app to crash. (81783378)

I'm using semaphore in my application, and that rings a bell into my head.

And there is workaround for it:

Workaround: In Xcode, select Product > Scheme > Edit Scheme, then deselect Run > Options > Queue Debugging > “Enable backtrace recording.”

After that everything seems to work normal.

Hey guys see my answer below. Hope it helps :)

Same issue while performing this:

let preferences = WKPreferences()        <---     Thread 8: EXC_BREAKPOINT CRASH

I'm on a 2019 MBP (not M1) and enabling "“Enable backtrace recording.”" didn't solve the problem.

Random crashes on Xcode 13
 
 
Q