MPMoviePlayer错误加载文件

时间:2012-03-24 06:01:12

标签: iphone objective-c simulator mpmovieplayer

我正在尝试使用MPMoviePlayer播放一部简单的电影,我一直在控制台中收到此错误(但是电影正在播放): 我的xcode版本是4.3.1。

2012-03-24 14:51:49.488 european_culture[450:17a07] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn:  dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.496 european_culture[450:17a07] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn:  dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.584 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.592 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.610 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.617 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:51.749 european_culture[450:13a03] Unbalanced calls to begin/end appearance transitions for <MPMoviePlayerViewController: 0x935f500>.
2012-03-24 14:51:51.930 european_culture[450:15303] AQMixerDevice::SetMixerChannelLayout(0x7d47f50): scope 1, element 1, layout: tag=0x640001: error -10851

但是我在我的iPad(5.1)上进行了测试,并且消息不同。(电影也播放了。)

Unbalanced calls to begin/end appearance transitions for <MPMoviePlayerViewController: 0xf6a0c40>.

有什么问题? 这是我按下按钮时应播放电影的代码:

-(void)playMovie:(NSString *)fileName   
{
NSString *movieFile = [[NSBundle mainBundle] pathForResource:fileName ofType:@"mov"];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:movieFile];
MPMoviePlayerViewController *tempMoviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:fileURL];
MPMoviePlayerController *moviePlayer = [tempMoviePlayer moviePlayer];

[tempMoviePlayer.view setFrame:CGRectMake(0, 0, 1024, 768)];
[_zoomImageView addSubview: tempMoviePlayer.view];
[self presentMoviePlayerViewControllerAnimated:tempMoviePlayer]; 
[self setWantsFullScreenLayout:YES]; 
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playMovieFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
[moviePlayer play];

[fileURL release];
[tempMoviePlayer release];
}

请帮助我 非常感谢。

1 个答案:

答案 0 :(得分:5)

这是iOS SDK 5 / Simulator的确认错误 - 一旦模拟器尝试播放声音(来自电影或任何其他声源)就会发生。不过不用担心,它在实际设备上不会出现问题。

您提到了用户在使用您的应用时遇到问题的实际报告 - 这些问题与您上面发布的问题无关/无关。

此问题由Apple根据错误ID#10555404提交。我自己提交了一份报告,该报告最终被确定为上述错误ID的伪装。

此问题目前仍然存在,直到并包括Xcode版本4.3.2(4E2002),iOS SDK 5.1。

可能是这个问题如果您错误地导入Mac OSX框架而不是iOs框架,可能会发生此问题。删除Mac OS框架对我有用。

请记住设置委托(self.player.delegate = self)并使用委托的方法进行清理:

-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)playedSuccessfully 
 {
       self.player = nil;
 }

来自here