iOS开发:使用AVAudioPlayer,程序在prepareToPlay崩溃

原因是:出现项目中加入了“断点”!  真特么逗~

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.

在  stackoverflow.com/ 网站上有相关bug解释!

  具体点看这  ----->   stackoverflow.com/search   膜拜大神!

把下图1所示的断点去掉就OK啦!


图1
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容