Im having this same problem, but is exclusively happening on tvOS 17+ the same code has been deployed and working fine since iOS 11 or 12. When pressing menu upon AVPlayerViewController disappearing i get a crash in what appears to be a very similar or potentially identical place.
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000008be94b260
Exception Codes: 0x0000000000000001, 0x00000008be94b260
VM Region Info: 0x8be94b260 is not in any region. Bytes after previous region: 26282865249 Bytes before following region: 30088580512
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 280000000-2a0000000 [512.0M] rw-/rwx SM=COW
---> GAP OF 0xd20000000 BYTES
commpage (reserved) fc0000000-1000000000 [ 1.0G] ---/--- SM=NUL ...(unallocated)
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [349]
Triggered by Thread: 0
Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x181f85cc4 class_getMethodImplementation + 40
1 Foundation 0x184fa3b84 _NSKVONotifyingOriginalClassForIsa + 28
2 Foundation 0x184f9f6ec _NSKeyValueObservationInfoGetObservances + 248
3 Foundation 0x184fa689c NSKeyValueWillChangeWithPerThreadPendingNotifications + 228
4 AVFoundation 0x1e97d3728 -[AVPlayerAccessibility willChangeValueForKey:] + 68
5 AVFCore 0x195a77824 -[AVPlayer _noteNewPresentationSizeForPlayerItem:] + 44
6 AVFCore 0x195ab5348 __avplayeritem_fpItemNotificationCallback_block_invoke + 3936
7 libdispatch.dylib 0x1822e8d48 _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x1822ea5fc _dispatch_client_callout + 16
9 libdispatch.dylib 0x1822f7298 _dispatch_main_queue_drain + 952
10 libdispatch.dylib 0x1822f6ed0 _dispatch_main_queue_callback_4CF + 40
11 CoreFoundation 0x182a12610 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
12 CoreFoundation 0x182a0cd5c __CFRunLoopRun + 2084
13 CoreFoundation 0x182a0c10c CFRunLoopRunSpecific + 572
14 GraphicsServices 0x18c95ea7c GSEventRunModal + 160
15 UIKitCore 0x19ef98ae4 -[UIApplication _run] + 868
16 UIKitCore 0x19ef9ccd4 UIApplicationMain + 148
17 Wondrium 0x104a59428 main + 64
18 dyld 0x181fc16e0 start + 1732
full crash report attached as well
Wondrium-2023-11-06-150013.txt