Pages

2012年4月1日日曜日

MPMoviePlayerViewController _serverConnectionDiedNotification


MPMoviePlayerViewControllerからのリクエストをサーバで受ける場合に注意が必要であるという件は前回の記事で書きました。

これは、直接関係しているかどうかはわかりませんし、未確定情報ですが、一回の再生で何度もリクエストを送るということで、それぞれに時間のかかる処理を入れてしまうと再生が遅くなるのは当然ですが、ときおり下記のようなエラーが発生する場合があります。

_serverConnectionDiedNotification. Info -- notification=Error Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action" UserInfo=0xde25730 {NSLocalizedRecoverySuggestion=Try again later., NSLocalizedDescription=Cannot Complete Action}, AVPlayer = <MPQueuePlayer: 0xdef2540>, currentTime = 0.00
 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An AVPlayerItem cannot be associated with more than one instance of AVPlayer'
*** First throw call stack:
(0x372b688f 0x357bc259 0x367170dd 0x3670dedb 0x3670ec37 0x3450cc59 0x3450eee7 0x372892ad 0x3720c4a5 0x3720c36d 0x32119439 0x33990e7d 0xa9a55 0xa94f0)

これは、実験的にサーバ処理の中にスリープを入れ、スリープをある程度長くすると発生したという結果からの私の推測です。エラーの内容も接続が切れたので処理を完了できなかったというように読めます。

ご参考までに。


0 コメント:

コメントを投稿