我有一个影响10%用户的崩溃问题,但我无法重现它,也不知道确切的发生时间。
Crashlytics 报告称,大约一半崩溃的用户没有打开应用,即正在进行后台音频或AirPlay。该应用程序播放 HLS 视频流,并在进入后台时切换到仅音频版本。
有什么想法,或者我的单例播放器类为什么会有多个 AVPlayer 实例?
谢谢!
Exception Type:
NSInvalidArgumentException
Reason:
An AVPlayerItem cannot be associated with more than one instance of AVPlayer
Fatal Exception
Latest Crash: 4/06/2013 at 8:48:46 UTC+0200
0 CoreFoundation __exceptionPreprocess + 162
1 libobjc.A.dylib objc_exception_throw + 30
2 AVFoundation -[AVPlayerItem _attachToPlayer:] + 188
3 AVFoundation -[AVPlayer _attachItem:andPerformOperation:withObject:] + 336
4 AVFoundation -[AVPlayer _insertItem:afterItem:] + 26
5 AVFoundation -[AVQueuePlayer insertItem:afterItem:] + 136
6 MediaPlayer __block_global_4 + 520
7
...
libdispatch.dylib _dispatch_call_block_and_release + 10
14