An AVPlayerItem cannot be associated with more than one instance of AVPlayer in iOS 8.4 An AVPlayerItem cannot be associated with more than one instance of AVPlayer in iOS 8.4 ios ios

An AVPlayerItem cannot be associated with more than one instance of AVPlayer in iOS 8.4


The solution is:

Don't use MPMoviePlayerController, sorry. Refactor to use AVPlayerViewController instead. This is a more modern API; the one you are using has been deprecated so it is not shocking that it has a strange mysterious crash on a newer version of iOS.


I had a problem that sounds somewhat familiar to yours, but may or may not be exactly the same thing. I had multiple view controllers and I was arranging for one view controller to suspend its movie so another could play. But when the device rotated, the standard iOS tab bar controller that I was using would load the other view controllers (calling viewDidLoad I believe) for any other tabs on the tab bar if they had not been loaded yet already. I was not expecting this behavior, as the tabs were never selected by me. My code to load the movie was in viewDidLoad, and so it was trying to start playing another movie on the other view controller that had never been asked to "appear". It took me a while to even realize what was going on because the two view controllers were inheriting from the same base class and it looked like the right object in the debugger, until I looked closer.

If memory serves, I moved the code to load and start playing my movies into viewWillAppear so that it would not execute unless the tab was really selected. Then when the device is rotated, and the other view controller is suddenly loaded, it has no adverse side effects. It's still weird to see it do that though.