Open Goolpe opened 2 months ago
I am going to look to that. This bug is probably serious. Perhaps it's a problem when the recorder is stopped but the driver has still data in its buffers. I had a hard time to setup an iOS implementation working. I am going to work on this bug. Sorry for the bug
Thank you for the help, but unfortunately crash happened again with 9.9.6
1 (EXC_BREAKPOINT)
2 (without logs EXC_BAD_ACCESS)
@Goolpe Have you solved this problem?
@Larpoux Can you provide some help? I'm not familiar with oc
@rRemix : are you sure this is the same crash ? Actually @Goolpe is the only user who complained about this bug.
@Larpoux yes, just start and stop recorder over and over again
I have no idea of the reason. Perhaps there is something which is not released correctly after each stop() and there is an overflow ? Perhaps there is a race condition with asynchronous process ?
It's very hard to debug that because the crash does not say anything useful, and we cannot reproduce the bug simply.
@Larpoux i change getStatus() == 0
to status == 0
, it's seem work fine. i think it's because AudioRecorderEngine was released but invoke it's method in async code block.
Flutter Sound Version :
├── flutter_sound 9.9.4 │ ├── flutter_sound_platform_interface... │ ├── flutter_sound_web 9.9.4 │ │ ├── flutter_sound_platform_interface... ├── flutter_sound_platform_interface 9.9.4
Severity
Platforms you faced the error
iOS (17.5.1)
Real device (iPhone 11)
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior: We are using recorder to stream
_recorder.startRecorder( toStream: _recordingDataController?.sink, codec: Codec.pcm16, audioSource: AudioSource.microphone, );
void stop(){ await _recorder.stopRecorder(); await _disposeRecorderStream(); }
I didn't find the way to 100% reproduce it Just start and stop multiple times And on stop - the app freezes
Logs
Expand to see
``` flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundRecorder.stopRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:730:13) flutter: │ #1 SoundRecorder.cancel (package:praktika_ai_flutter/services/audio/SoundRecorder.dart:126:23) flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ flutter: │ 🐛 FS:---> stopRecorder flutter: └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundRecorder._stopRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:740:13) flutter: │ #1 FlutterSoundRecorder.stopRecorder.