If I leave Xcode 15 active, it will always crash macOS Sonoma after a few hours.
Xcode 15 crashes macOS Sonoma
Hard to say. Have you a crash report ?
You should file a bug report (and attach the crash report).
also having crash in Xcode if I leave it open (either just open, or running a debug session searching for an intermediate memory leak). MacBookPro, M1 Pro. Xcode 15.0.1 and macOS 14.1.2.
Translated Report (Full Report Below)
Process: Xcode [2834] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 15.0.1 (22266) Build Info: IDEApplication-22266000000000000~15 (15A507) App Item ID: 497799835 App External ID: 860559424 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501
Date/Time: 2023-12-04 13:01:29.5210 -0800 OS Version: macOS 14.1.2 (23B92) Report Version: 12 Anonymous UUID: 94D9A24C-E6F8-6B77-2714-5078DBEBF8C7
Time Awake Since Boot: 180000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x0000000189fbe244
Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5 Terminating Process: exc handler [2834]
Application Specific Information: BUG IN CLIENT OF LIBPLATFORM: os_unfair_lock is corrupt Abort Cause 15708772
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x189fbe244 _os_unfair_lock_corruption_abort + 88 1 libsystem_platform.dylib 0x189fb9788 os_unfair_lock_lock_slow + 332 2 Foundation 0x18b1633f4 NSSetLongLongValueAndNotify + 84 3 DVTFoundation 0x104643910 closure #1 in DVTCoreDevice.endPreparationOperation(::) + 96 4 DVTFoundation 0x1045d2a48 thunk for @escaping @callee_guaranteed () -> () + 28 5 DVTFoundation 0x104577330 DVT_CALLING_CLIENT_BLOCK + 16 6 DVTFoundation 0x104577cf0 __DVTDispatchAsync_block_invoke + 48 7 libdispatch.dylib 0x189dddcb8 _dispatch_call_block_and_release + 32 8 libdispatch.dylib 0x189ddf910 _dispatch_client_callout + 20 9 libdispatch.dylib 0x189dedfa8 _dispatch_main_queue_drain + 984 10 libdispatch.dylib 0x189dedbc0 _dispatch_main_queue_callback_4CF + 44 11 CoreFoundation 0x18a0ab15c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 12 CoreFoundation 0x18a068a80 __CFRunLoopRun + 1996 13 CoreFoundation 0x18a067c5c CFRunLoopRunSpecific + 608 14 HIToolbox 0x1945e4448 RunCurrentEventLoopInMode + 292 15 HIToolbox 0x1945e40d8 ReceiveNextEventCommon + 220 16 HIToolbox 0x1945e3fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76 17 AppKit 0x18d842c54 _DPSNextEvent + 660 18 AppKit 0x18e018ebc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716 19 DVTKit 0x1033e8a9c -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 300 20 AppKit 0x18d836100 -[NSApplication run] + 476 21 DVTKit 0x1033e7cbc -[DVTApplication run] + 60 22 AppKit 0x18d80d3cc NSApplicationMain + 880 23 dyld 0x189c110e0 start + 2360