I have an AVPlayer that runs fine on iOS 4.3 and above. When I try to get it to work on iOS 4.2, this happens after dealloc:
An instance 0x69c3b0 of class AVPlayer was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
<NSKeyValueObservationInfo 0x42626d0> (
<NSKeyValueObservance 0x69f480: Observer: 0x666b20, Key path: currentItem.nonForcedSubtitleDisplayEnabled, Options: <New: NO, Old: NO, Prior: NO> Context: 0x3ea5b558, Property: 0x69f4c0>
This would be ok, but right after, is this:
-[NSKVONotifying_AVPlayer removeObserver:forKeyPath:]: message sent to deallocated instance 0x69c3b0
I checked to make sure all of my observers are removed properly, and I'm fairly certain they are. The only difference in my code from 4.3 to 4.2 is this: HTTP Live Streaming with AVPlayer in iOS 4.0?
This looks to me like its something AVPlayer is handling internally, and is trying to remove the observer after it's already been released. Am I going crazy or is this just a bug with 4.2?