Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/98.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
XCode/AVFoundation/iOS模拟器中的EXC\u错误\u访问代码=1地址=0x0_Ios_Swift_Xcode - Fatal编程技术网

XCode/AVFoundation/iOS模拟器中的EXC\u错误\u访问代码=1地址=0x0

XCode/AVFoundation/iOS模拟器中的EXC\u错误\u访问代码=1地址=0x0,ios,swift,xcode,Ios,Swift,Xcode,XCode 8.0 斯威夫特4 我使用AVFoundation/AVAudioRecorder,想录制一些东西,但iOS模拟器总是崩溃 参照本规范: 代码: 在短语recorder=try AVAudioRecorder.init(url:fileURL,settings:recordSetting)中出现了错误“Thread 1:EXC\u BAD\u ACCESS(code=1,address=0x0)” 错误登录0-[AVAudioRecorder privCommonCleanup]:

XCode 8.0 斯威夫特4

我使用AVFoundation/AVAudioRecorder,想录制一些东西,但iOS模拟器总是崩溃

参照本规范:

代码:

在短语
recorder=try AVAudioRecorder.init(url:fileURL,settings:recordSetting)中出现了错误“
Thread 1:EXC\u BAD\u ACCESS(code=1,address=0x0)

错误登录
0-[AVAudioRecorder privCommonCleanup]

1 AVFAudio`-[AVAudioRecorder privCommonCleanup]:
~ //...
8   ->  0x118f15a08 <+18>:  movq   $0x0, (%rbx)  //error
1 AVFAudio`-[AVAudioRecorder PrivaCommonCleanup]:
~ //...
8->0x118f15a08:movq$0x0,(%rbx)//错误
搜索Internet时,这个错误似乎是由于意外的内存释放而发生的,我对这个领域不太了解,无法解决这个问题


否则,这是iOS模拟器或swift 4的错误吗?

很抱歉,第6行输入了错误的短语,请在更正后完成


var记录器=AVAudioRecorder()

正确

var记录器:AVAudioRecorder

您的意思是通过更改第6行(只是一个输入错误)解决了问题吗?如果是这样,我建议删除您的问题/答案,因为这对其他人没有帮助。
1 AVFAudio`-[AVAudioRecorder privCommonCleanup]:
~ //...
8   ->  0x118f15a08 <+18>:  movq   $0x0, (%rbx)  //error