An AVPlayerItem cannot be associated with more than one instance of AVPlayer on iOS8.4

Since iOS8.4 release, KooTV app received lots of crash report which doesn't appears before.

KooTV app use MPMoviePlayerController to play stream HLS.

Here is the crash stack information, it there any one crash like this?


An AVPlayerItem cannot be associated with more than one instance of AVPlayer
(null)
(
  0   CoreFoundation                      0x0000000184fc02f4 <redacted> + 160
  1   libobjc.A.dylib                     0x0000000196c8c0e4 objc_exception_throw + 60
  2   AVFoundation                        0x0000000183794b50 <redacted> + 0
  3   AVFoundation                        0x0000000183787770 <redacted> + 260
  4   AVFoundation                        0x00000001837a8f00 <redacted> + 156
  5   MediaPlayer                         0x00000001873b1d30 <redacted> + 72
  6   MediaPlayer                         0x000000018731de7c <redacted> + 1396
  7   MediaPlayer                         0x000000018731d8a4 <redacted> + 1452
  8   MediaPlayer                         0x000000018731f2fc <redacted> + 36
  9   libdispatch.dylib                   0x0000000197309994 <redacted> + 24
  10  libdispatch.dylib                   0x0000000197309954 <redacted> + 16
  11  libdispatch.dylib                   0x000000019730e20c _dispatch_main_queue_callback_4CF + 1608
  12  CoreFoundation                      0x0000000184f777f8 <redacted> + 12
  13  CoreFoundation                      0x0000000184f758a0 <redacted> + 1492
  14  CoreFoundation                      0x0000000184ea12d4 CFRunLoopRunSpecific + 396
  15  GraphicsServices                    0x000000018e8f76fc GSEventRunModal + 168
  16  UIKit                               0x0000000189a9ef40 UIApplicationMain + 1488
  17  genetv                              0x1000879a0 genetv + 555424
  18  libdyld.dylib                       0x0000000197336a08 <redacted> + 4
)

I'm facing a similar crash which is coming only from 8.4 devices.


There's a workaround to send -stop to the videoplayer before chaging its contentURL, but it doesn't seem to help in my case.

you cannot have same item associated with two different players. Recreate the item or null the player with which it was associated with.

According to my crash logs reports, this issue seems to have vanished in iOS 9 without changing how I use MPMoviePlayerViewController.

An AVPlayerItem cannot be associated with more than one instance of AVPlayer on iOS8.4
 
 
Q