2014-07-09 65 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中的连接。我删除了它们,并解决了问题。