AVAudioPlayer初始化时,在模拟器中报异常
2019-10-03 本文已影响0人
114105lijia
解决方法是去掉全局断点或者设置全局断点类型为Objective-C,如下:
image.png
到网上找了些资料:
The problem was I normally develop with a breakpoint set to "All Exceptions", and the actual exception thrown was __cxa_throw. Which apparently turns out to be in C++ libraries that are used to implement AVAudioPlayer. By changing the breakpoint to "All Objective-C Exceptions" the program ran fine. (This can be done by editing the breakpoint and changing the Exception field to Objective-C.
大概意思是说这个异常是来自C++中,用来实现AVAudioPlayer的。。。