我的应用程序中有语音转文本功能,请按住按钮;视图控制器从窗口边界外动画进入视图并开始录制,释放按钮;录制停止,视图动画超出窗口范围。
突然,我通过 Firebase Crashreporting 收到一些崩溃报告,该功能在某些用户(2 个用户 / 5 个实例,所有相同的事件)上崩溃了.. 下面是我的崩溃日志事件指向我的代码.. 但是,我只是无法重现错误,我已经尝试了 1000 次,压力加载(猴子按钮捣碎它等),它不会在我的设备上崩溃..
有人可以帮我剖析底部/建议中的堆栈跟踪吗?/ 有什么问题的建议?我能做些什么来稳定?
据我了解,它围绕 installTapOnBus:0? 对下一步有什么建议吗?
_audioEngine = [[AVAudioEngine alloc] init];
_speechRecognizer = [[SFSpeechRecognizer alloc] initWithLocale:[NSLocale localeWithLocaleIdentifier:@"da"]];
[_speechRecognizer setDelegate:self];
_request = [[SFSpeechAudioBufferRecognitionRequest alloc] init];
AVAudioInputNode *node =[_audioEngine inputNode];
AVAudioFormat *recordingFormat = [node outputFormatForBus:0];
[node installTapOnBus:0 bufferSize:1024 format:recordingFormat block:^(AVAudioPCMBuffer * _Nonnull buffer, AVAudioTime * _Nonnull when) {
[_request appendAudioPCMBuffer:buffer];
}];
}
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪:
1 CoreFoundation __exceptionPreprocess + 1232864
2 libobjc.A.dylib objc_exception_throw + 34100
3 CoreFoundation +[NSException raise:format:arguments:] + 1232560
4 …Run Code Online (Sandbox Code Playgroud)