【问题标题】:MediaPlayer crash on iOS 7.1 (MPAVItem)iOS 7.1 (MPAVItem) 上的 MediaPlayer 崩溃
【发布时间】:2014-03-26 00:54:15
【问题描述】:

我正在使用 UIWebview 在我的 iOS 应用上播放 YouTube 视频,在 iOS 7.1 发布后,我收到了很多以下崩溃报告:

Exception Type:  EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  1

Thread 0:
0   libobjc.A.dylib                 0x393dd637 objc_msgSend + 23
1   Foundation                      0x2f563d57 +[NSConcreteNotification     newTempNotificationWithName:object:userInfo:] + 119
2   Foundation                      0x2f563ca9 -[NSNotificationCenter     postNotificationName:object:userInfo:] + 45
3   Foundation                      0x2f5685c3 -[NSNotificationCenter     postNotificationName:object:] + 27
4   MediaPlayer                     0x2feb17b9 __53-[MPAVItem     _playerItemNewAccessLogEntryNotification:]_block_invoke + 69
5   libdispatch.dylib               0x398bcd51 _dispatch_call_block_and_release + 9
6   libdispatch.dylib               0x398bcd3d _dispatch_client_callout + 21
7   libdispatch.dylib               0x398bf6bf _dispatch_main_queue_callback_4CF + 275
8   CoreFoundation                  0x2ec0d675 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 5
9   CoreFoundation                  0x2ec0bf41 __CFRunLoopRun + 1305
10  CoreFoundation                  0x2eb767a5 CFRunLoopRunSpecific + 521
11  CoreFoundation                  0x2eb76587 CFRunLoopRunInMode + 103
12  GraphicsServices                0x33ad36cf GSEventRunModal + 135
13  UIKit                           0x314d588d UIApplicationMain + 1133
14  myApp                           0x000eb679 0xe7000 + 18041
15  myApp                           0x000eb5c4 0xe7000 + 17860

Thread 1 Crashed:
0   libsystem_kernel.dylib          0x39975804 kevent64 + 24
1   libdispatch.dylib               0x398c4051 _dispatch_mgr_invoke + 229
2   libdispatch.dylib               0x398be2df _dispatch_mgr_thread + 35

也许操作系统正在尝试向不再存在的对象发布通知。我没有直接使用 MBAVItem,所以应该在 UIWebview 播放 YouTube 视频时调用它。根据 iTunes connect,此崩溃仅发生在 iOS 7.1 上(至少目前如此),并成为最常见的崩溃。

【问题讨论】:

  • 同样的症状,同样的情况。在 Xcode 下运行,我得到:*** -[MPAVItem retain]: message sent to deallocated instance 0x17a7b1720

标签: objective-c ios7 uiwebview media-player crash-reports


【解决方案1】:

我曾经为每首歌曲创建新的 YouTube HTML 播放器,播放 5 到 10 首歌曲后会发生崩溃。

经过一些实验,可以通过使用相同的YouTube HTML播放器加载不同的歌曲来避免这种崩溃(不要创建新的,只需调用loadVideoById()),希望这个答案可以帮助某人=)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-19
    • 2014-12-13
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多