如果没有发送适当的KVO通知,关键“播放器”已更改

时间:2016-03-11 18:58:37

标签: ios objective-c avplayer key-value-observing avplayeritem

我在我的类PCSPlayerNotification中观察AVPlayer对象KVO通知,我发现下面的崩溃。我无法重现这个问题,我很少得到这个问题。 我读了这个http://www.cocoabuilder.com/archive/cocoa/204196-cannot-remove-observer-error.html,我发现问题的原因必须是AVPlayer发送的KVO通知。但是不确定如何修复,任何人都可以帮我解决这个问题。

问题:

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.

崩溃:

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

0 个答案:

没有答案