I am observing AVPlayer object KVO notification in my class PCSPlayerNotification and I found the below crash.I am unable to reproduce this issue and I get this issue rarely. I read this http://www.cocoabuilder.com/archive/cocoa/204196-cannot-remove-observer-error.html and I found the cause of the issue must be with KVO notification that is sent by AVPlayer.But not sure how to fix ,can anyone help me to fix this issue.
Issue :
Fatal Exception: NSInternalInconsistencyException
Cannot update for observer <PCSPlayerNotification 0x7f78b70> for the key path "player.currentItem.playbackLikelyToKeepUp" from <PCSPlayerNotification 0x7f78b70>, most likely because the value for the key "player" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the PCSPlayerNotification class.
Crash :
Thread : Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x2b2315a7 __exceptionPreprocess
1 libobjc.A.dylib 0x39156c77 objc_exception_throw
2 CoreFoundation 0x2b2314ed -[NSException initWithCoder:]
3 Foundation 0x2bed464d -[NSKeyValueNestedProperty object:withObservance:didChangeValueForKeyOrKeys:recurse:forwardingValues:]
4 Foundation 0x2beb4151 NSKeyValueDidChange
5 Foundation 0x2bea0991 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:]
6 VZFiOSMobile 0x4f33f1 (Missing)
7 libdispatch.dylib 0x396c1c83 _dispatch_call_block_and_release
8 libdispatch.dylib 0x396c1c6f _dispatch_client_callout
9 libdispatch.dylib 0x396cd553 _dispatch_main_queue_callback_4CF$VARIANT$mp
10 CoreFoundation 0x2b1f7891 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
11 CoreFoundation 0x2b1f5fb1 __CFRunLoopRun
12 CoreFoundation 0x2b142b51 CFRunLoopRunSpecific
13 CoreFoundation 0x2b142963 CFRunLoopRunInMode
14 GraphicsServices 0x326501a9 GSEventRunModal
15 UIKit 0x2e794c91 UIApplicationMain
16 VZFiOSMobile 0x272c1d main (main.m:16)
17 libdyld.dylib 0x396ffaaf start