AppKit crash on macOS Ventura beta 6

Hi, We keep getting the following crash, with an App compiled with Xcode 13, on macOS Ventura beta 6:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process:   exc handler [2484]

Application Specific Signatures:
API Misuse

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libxpc.dylib                  	    0x7ff81a6b8936 _xpc_api_misuse + 117
1   libxpc.dylib                  	    0x7ff81a6a0a49 xpc_connection_set_target_uid + 188
2   WindowManagement              	    0x7ffb32635bfb -[WMClientWindowManager _createXPCConnection] + 859
3   WindowManagement              	    0x7ffb3263661e -[WMClientWindowManager _xpcConnection] + 174
4   WindowManagement              	    0x7ffb326340c6 -[WMClientWindowManager stages] + 86
5   AppKit                        	    0x7ff81e619737 __54-[NSWMWindowCoordinator initializeStageFramesIfNeeded]_block_invoke + 35
6   libdispatch.dylib             	    0x7ff81a7b1aa4 _dispatch_client_callout + 8
7   libdispatch.dylib             	    0x7ff81a7b2c92 _dispatch_once_callout + 20
8   AppKit                        	    0x7ff81e619712 -[NSWMWindowCoordinator initializeStageFramesIfNeeded] + 86
9   AppKit                        	    0x7ff81db2d0a4 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 867
10  AppKit                        	    0x7ff81db2c932 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1067
11  AppKit                        	    0x7ff81db2c500 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
12  AppKit                        	    0x7ff81db2aa1f -[NSWindowTemplate nibInstantiate] + 354
13  AppKit                        	    0x7ff81daf8f1e -[NSIBObjectData instantiateObject:] + 222
14  AppKit                        	    0x7ff81daf8690 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 476
15  AppKit                        	    0x7ff81daed16b loadNib + 420
16  AppKit                        	    0x7ff81daec557 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 737
17  AppKit                        	    0x7ff81daec181 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
18  AppKit                        	    0x7ff81daebf5f +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 394
19  AppKit                        	    0x7ff81dadea6f NSApplicationMain + 566
20  <App name>                 	       0x1040399c9 main + 9
21  dyld                          	    0x7ff81a601310 start + 2432
Same build works perfectly on macOS Ventura.

This app is UI-less, notarized and has several system entitlements (if it is relevant). We thought the Xcode version might be related, but since this App is supposed to be released before Xcode 14 is out, we do not wish to build a production app using a beta IDE.

Is this a known issue? Is there something we can do about it?

Rebooting the machine solves the issue, but of course this is not a solution one can give to users.

Hi, This also happens with an App that is compiled with Xcode 14, and still happens on latest beta (7). Did anyone experience such crashes? Also opened a ticket: FB11447626

I have same error,this looks external display error, i try disabled external display is no problem

AppKit crash on macOS Ventura beta 6
 
 
Q