My application plist has
<key>NSApplicationCrashOnExceptions</key>
<true/>
and yet in macOS Big Sur, it’s not crashing during exceptions.
In this case, the exception happens during a DragItem.
There are 3 items on the pasteboard, but 1 drag images. There must be 1 draggingItem per pasteboardItem.
com.apple.AppKit error AppKit General There are 3 items on the pasteboard, but 1 drag images. There must be 1 draggingItem per pasteboardItem.
0 CoreFoundation 0x00007fff2063783b __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2036fd92 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2063769f +[NSException raise:format:] + 189
3 AppKit 0x00007fff2310a460 -[NSDraggingSession(NSInternal) _initWithPasteboard:image:offset:source:] + 245
4 AppKit 0x00007fff23109e98 -[NSCoreDragManager dragImage:fromWindow:at:offset:event:pasteboard:source:slideBack:] + 1767
5 AppKit 0x00007fff231097a2 -[NSWindow(NSDrag) dragImage:at:offset:event:pasteboard:source:slideBack:] + 134
6 XojoFramework.dylib 0x000000010677a312 _Z16CocoaPerformDragP14DragItemObject + 2718
7 MyApp 0x00000001047f3474 DragItem.Drag%%o<DragItem> + 36
I’ve fixed this particular crash, but the fact that it silently fails was really hard to debug.
Does NSApplicationCrashOnExceptions no longer work? Or am I doing it wrong?