gpt4 book ai didi

objective-c - MediaPlayer 在 iOS 7.1 (MPAVItem) 上崩溃

转载 作者:太空狗 更新时间:2023-10-30 03:38:30 24 4
gpt4 key购买 nike

我正在使用 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 上(至少目前是这样),并且成为最频繁的崩溃。

最佳答案

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

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

关于objective-c - MediaPlayer 在 iOS 7.1 (MPAVItem) 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22649407/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com