2012-01-13 64 views
3

这只发生在Lion上的iOS 5模拟器上。如果我在设备或iPhone 4.3模拟器上尝试它,它可以正常工作。在MPMoviePlayerController中播放视频时出错:未找到符号:___CFObjCIsCollectable

基本上我初始化moviePlayer远程URL,视频缓冲,当我希望它开始播放,它与此错误崩溃:

2012-01-13 08:07:29.169 pluralsight-app[560:1760f] 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: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 
in /System/Library/Frameworks/Security.framework/Versions/A/Security 
2012-01-13 08:07:29.181 pluralsight-app[560:1760f] 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: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 
in /System/Library/Frameworks/Security.framework/Versions/A/Security 

我读过,这可能是Lion中的一个错误,但希望找到解决方法,因为它影响我的生产力。

任何想法?

+0

它真的会崩溃吗?或者你只是在控制台中看到这些错误,并且它一直播放声音就好(8次,同样的错误消息,然后播放开始罚款)?在任何情况下,根据我的经验,Xcode 4.2.1(就像新beta版一样)在iOS 5.x模拟器(不是较低版本)中显示类似的错误消息,但是在Lion上玩的很好(没有崩溃)。请参阅http://stackoverflow.com/questions/7961840/what-does-this-gdb-output-mean/83​​17546#8317546 – Till 2012-01-14 00:33:16

+0

是的,它崩溃。 – 2012-01-15 22:40:02

+0

那么,我建议你重新安装Xcode(确保你做了一个干净的扫描;'sudo/Developer/Library/uninstall-devtools --mode = all'),因为这似乎是一个破坏的安装 - 对我来说,它似乎是几个版本的模拟器的混合。 – Till 2012-01-15 22:47:38

回答

3

我与AVPlayer有同样的问题,最终发现问题:我有一个为所有异常设置的断点,但AVPlayer正常工作时会产生异常。因此错误消息&崩溃。

修复:转到XCode中的断点列表(View | Navigators | Debug Navigator)并查找“All Exceptions”断点 - 它看起来像这样:Exception Breakpoint

删除,再次尝试代码。

在某些地方报告的这种崩溃的另一个原因是使用ARC并尝试使用本地分配的AVPlayer对象播放声音时。显然,使用ARC可能会导致播放器在播放之前被清除。

解决这个问题的方法是通过分配一个ivar,

@property (nonatomic, retain) currentPlayer; 


- (void) playSound { 
    AVAudioPlayer *player = [[AVAudioPlayer alloc] init]; 
    self.currentPlayer = player; // Need the strong reference otherwise next line can fail 
    [player play]; 
} 
+0

耶,这对我工作 – 2012-09-22 06:58:42

+0

*认为*这是一个复本http://stackoverflow.com/questions/7407323/mpmovieplayercontroller-not-working-in-ios-5-xcode-with-storyboard-but-works – 2012-09-22 06:59:44

相关问题