2012-01-13 47 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

相關問題