2014-07-09 64 views
0

我開發了一款遊戲,但現在我正在嘗試爲其添加音樂。它曾在iPhone 3.5 Simulator中運行過一次,但現在每次運行它都會崩潰。這是怎麼回事?威脅1:信號Sigabrt錯誤

NSString *music = [[NSBundle mainBundle] pathForResource:@"Intro Soundtrack" ofType:@"mp3"]; 
audioPlayer1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:music] error:NULL]; 
audioPlayer1.delegate = self; 
audioPlayer1.numberOfLoops = -1; 
[audioPlayer1 play]; // Exception breakpoint says it is this line, but what's wrong here? I don't see anything wrong. 

我得到線程1:信號SIGABRT錯誤。

回答

0

進一步的研究表明,我在我的代碼中刪除了IBOutlets,但沒有刪除IB中的連接。我刪除了它們,並解決了問題。