Aerial: macOS Ventura: Crash after closing the Options/Settings Sheet

M1 mac mini, macOS Ventura Beta 1 22a5226r two monitors (17" HDMI and 15" VGA)

I believe this is a macOS bug, as it’s being seen with various screensavers such as https://github.com/soffes/Clock.saver and https://iscreensaver.com

Reported to Apple Feedback as FB10103112.

Seen both with ARM native and Intel x64 Rosetta emulated screensavers.

I’m trying to find a workaround using my own screensaver software, if I stumble across anything I will report back.

Example crash log:

Process:               Screen Saver [3234]
Path:                  /System/Library/ExtensionKit/Extensions/Screen Saver.appex/Contents/MacOS/Screen Saver
Identifier:            com.apple.ScreenSaver-Settings.extension
Version:               1.0 (1)
Build Info:            DesktopScreenEffectsPref-283000000000000~10
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2022-06-08 07:46:13.7537 -0700
OS Version:            macOS 13.0 (22A5266r)
Report Version:        12
Anonymous UUID:        E1E1B825-F9F6-3DB0-A932-7E0490DDEA1D


Time Awake Since Boot: 2100 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x0000000102699b98

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [3234]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   Screen Saver                  	       0x102699b98 0x102684000 + 88984
1   Screen Saver                  	       0x1026999e8 0x102684000 + 88552
2   Screen Saver                  	       0x10268d80c 0x102684000 + 38924
3   ScreenSaver                   	       0x1c8a3dbd0 -[LegacyScreenSaverModule _requestDidCompleteNotification:] + 360
4   CoreFoundation                	       0x18a87c2d4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
5   CoreFoundation                	       0x18a9199bc ___CFXRegistrationPost_block_invoke + 88
6   CoreFoundation                	       0x18a919904 _CFXRegistrationPost + 440
7   CoreFoundation                	       0x18a84c42c _CFXNotificationPost + 708
8   Foundation                    	       0x18b72b778 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
9   ScreenSaver                   	       0x1c8a34ed8 __58-[ScreenSaverExtensionModule initWithExtension:isPreview:]_block_invoke.28 + 288
10  ExtensionFoundation           	       0x1f4d964ac __93-[EXConcreteExtension _completeRequestReturningItems:forExtensionContextWithUUID:completion:]_block_invoke + 132
11  libdispatch.dylib             	       0x18a61daf4 _dispatch_call_block_and_release + 32
12  libdispatch.dylib             	       0x18a61f61c _dispatch_client_callout + 20
13  libdispatch.dylib             	       0x18a62ddd4 _dispatch_main_queue_drain + 928
14  libdispatch.dylib             	       0x18a62da24 _dispatch_main_queue_callback_4CF + 44
15  CoreFoundation                	       0x18a8c854c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
16  CoreFoundation                	       0x18a8863c4 __CFRunLoopRun + 2036
17  CoreFoundation                	       0x18a88547c CFRunLoopRunSpecific + 612
18  HIToolbox                     	       0x193fbe634 RunCurrentEventLoopInMode + 292
19  HIToolbox                     	       0x193fbe478 ReceiveNextEventCommon + 700
20  HIToolbox                     	       0x193fbe1a4 _BlockUntilNextEventMatchingListInModeWithFilter + 72
21  AppKit                        	       0x18dbabd78 _DPSNextEvent + 632
22  AppKit                        	       0x18dbaaf08 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
23  ViewBridge                    	       0x19240c4d0 __75-[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke + 136
24  ViewBridge                    	       0x19240c2f0 -[NSViewServiceApplication _withToxicEventMonitorPerform:] + 152
25  ViewBridge                    	       0x1923fa304 -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 168
26  AppKit                        	       0x18dd54470 -[NSWindow(NSEventRouting) trackEventsMatchingMask:timeout:mode:handler:] + 216
27  ViewBridge                    	       0x192460718 -[NSRemoteView _beginTrackingLoop:reply:] + 472
28  ViewBridge                    	       0x19246394c -[NSRemoteViewMarshal beginTrackingLoop:reply:] + 84
29  CoreFoundation                	       0x18a869bc4 __invoking___ + 148
30  CoreFoundation                	       0x18a869a3c -[NSInvocation invoke] + 428
31  ViewBridge                    	       0x1923fb534 __deferNSXPCInvocationOntoMainThread_block_invoke + 132
32  ViewBridge                    	       0x1923f0814 __wrapBlockWithVoucher_block_invoke + 56
33  ViewBridge                    	       0x19248147c kNotRunningOnAppKitCompatibleThread_block_invoke + 360
34  CoreFoundation                	       0x18a8871a4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
35  CoreFoundation                	       0x18a8870b8 __CFRunLoopDoBlocks + 368
36  CoreFoundation                	       0x18a886564 __CFRunLoopRun + 2452
37  CoreFoundation                	       0x18a88547c CFRunLoopRunSpecific + 612
38  HIToolbox                     	       0x193fbe634 RunCurrentEventLoopInMode + 292
39  HIToolbox                     	       0x193fbe478 ReceiveNextEventCommon + 700
40  HIToolbox                     	       0x193fbe1a4 _BlockUntilNextEventMatchingListInModeWithFilter + 72
41  AppKit                        	       0x18dbabd78 _DPSNextEvent + 632
42  AppKit                        	       0x18dbaaf08 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
43  ViewBridge                    	       0x19240c4d0 __75-[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke + 136
44  ViewBridge                    	       0x19240c2f0 -[NSViewServiceApplication _withToxicEventMonitorPerform:] + 152
45  ViewBridge                    	       0x1923fa304 -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 168
46  AppKit                        	       0x18db9f2cc -[NSApplication run] + 464
47  AppKit                        	       0x18db76838 NSApplicationMain + 880
48  libxpc.dylib                  	       0x18a522840 _xpc_objc_main + 976
49  libxpc.dylib                  	       0x18a5220ec xpc_main + 108
50  Foundation                    	       0x18b79aeb8 -[NSXPCListener resume] + 312
51  ExtensionKit                  	       0x1f4df5170 -[_EXRunningUIViewServiceExtension startWithArguments:count:] + 1148
52  ExtensionFoundation           	       0x1f4db0c4c EXExtensionMain + 232
53  Foundation                    	       0x18b7f80c8 NSExtensionMain + 240
54  dyld                          	       0x216b5fc10 start + 2368

About this issue

Most upvoted comments

Perhaps using a relative path with “~” doesn’t work? I had to go back and untangle my code, but here’s what I’m doing to read from inside the Sandbox from an app Outside the sandbox:

bundleID = "/Users/username/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Preferences/com.mycompany.myscreensaver"

key = "foobar"

value = CFPreferencesCopyValue(key, bundleID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost)

This works for me. Writing a value is similar, just uses the CFPreferencesSetValue() method.

Where I learned that the “applicationID” can include the path too? Don’t remember!