I'm getting occasional crashes, which have not happened while running under a debugger and I haven't figured out how to reproduce. I wonder if anyone can help me glean more information from a crash report. Here's the main part. This particular report if from macOS 14.2 beta, but I've also seen it from 14.1.1.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Codes: 0x0000000000000001, 0x0000000000000018
VM Region Info: 0x18 is not in any region. Bytes before following region: 140723250839528
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
mapped file 7ffcaf60c000-7ffcd7f48000 [649.2M] r-x/r-x SM=COW ...t_id=b7394f27
Error Formulating Crash Report:
PC register does not match crashing frame (0x0 vs 0x1022A3630)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 <translation info unavailable> 0x1022a3630 ???
1 libsystem_platform.dylib 0x7ff819d0b393 _sigtramp + 51
2 AppKit 0x7ff81d3549a6 -[NSControl _setWindow:] + 59
3 AppKit 0x7ff81d413c19 -[NSSegmentedControl _setWindow:] + 42
4 AppKit 0x7ff81defd3be __21-[NSView _setWindow:]_block_invoke.391 + 324
5 AppKit 0x7ff81d33a62c -[NSView _setWindow:] + 1886
6 AppKit 0x7ff81defd3be __21-[NSView _setWindow:]_block_invoke.391 + 324
7 AppKit 0x7ff81d33a62c -[NSView _setWindow:] + 1886
8 AppKit 0x7ff81d572d08 -[NSWindow dealloc] + 922
9 MyApp 0x1011b6b81 -[JWWindow dealloc] (in MyApp) (JWWindow.m:37)
10 Foundation 0x7ff81b3d179c _NSKVOPerformWithDeallocatingObservable + 151
11 Foundation 0x7ff81acc6d54 NSKVODeallocate + 150
12 libobjc.A.dylib 0x7ff8199189d7 AutoreleasePoolPage::releaseUntil(objc_object**) + 169
13 libobjc.A.dylib 0x7ff819915cf0 objc_autoreleasePoolPop + 235
14 CoreFoundation 0x7ff819d794a1 _CFAutoreleasePoolPop + 22
15 Foundation 0x7ff81ac869ea -[NSAutoreleasePool drain] + 133
16 AppKit 0x7ff81d315694 -[NSApplication run] + 653
17 AppKit 0x7ff81d2e9662 NSApplicationMain + 816
18 MyApp 0x100ef5034 start (in MyApp) + 52
I can see that it involves deallocating a window as part of draining an autorelease pool, but does the presence of _NSKVOPerformWithDeallocatingObservable
mean that KVO is involved somehow? And does the note "PC register does not match crashing frame" tell me anything?