Foundation - _NSKVONotifyingOriginalClassForIsa in tvos 15.2 and above

I reset the old player item(remove all observers also) and avplayercontroller then add a new avplayerviewcontroller instance and avplayer and player item on playing a new asset/stream etc. It works fine and no crash in tvos 14, 13 etc. But in tvos 15.2 and above i get the following stack trace.

Foundation - _NSKVONotifyingOriginalClassForIsa

Foundation _NSKVONotifyingOriginalClassForIsa 

Foundation _NSKeyValueObservationInfoGetObservances 

Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] 

Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey🔑 key:usingBlock:] 

Foundation _NSSetObjectValueAndNotify 

AVKit -[AVInterstitialController dealloc] 

AVKit -[AVPlayerControllerTVExtras .cxx_destruct] 

But in tvos 15.2 and above i get the following stack trace.

Please post a full crash report. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

please follow the link

I’m sorry but thread does not contain a full crash report. Please read Posting a Crash Report and post a full crash report per the instructions in that post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

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

Foundation - _NSKVONotifyingOriginalClassForIsa in tvos 15.2 and above
 
 
Q