Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR triggered when calling stopRecording method in AudioRecorder on Android #332

Open
duchl0202 opened this issue Aug 10, 2024 · 1 comment
Labels
waiting-for-response Waiting for someone to respond.

Comments

@duchl0202
Copy link

Hello,

I'm experiencing an ANR (Application Not Responding) issue when stopping audio recording using the AudioRecorder.stopRecording() method from the audio_waveforms plugin. This issue doesn't crash the app but causes it to freeze while waiting for a binder transaction. Below is the stack trace of the issue:

      main (native):tid=1 systid=4120 

#00 pc 0x9ae90 libc.so (__ioctl + 8)
#1 pc 0x6932f libc.so (ioctl + 26)
#2 pc 0x39a13 libbinder.so (android::IPCThreadState::talkWithDriver(bool) + 238)
#3 pc 0x3a655 libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel*, int*) + 32)
#4 pc 0x3a42b libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 122)
#5 pc 0x35267 libbinder.so (android::BpBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 98)
#6 pc 0x34b9f libmedia.so (android::BpMediaRecorder::stop() + 126)
#7 pc 0x3b7df libmedia.so (android::MediaRecorder::stop() + 58)
#8 pc 0x4c56b libmedia_jni.so (android_media_MediaRecorder_stop(_JNIEnv*, _jobject*) + 106)
at android.media.MediaRecorder.stop(Native method)
at com.simform.audio_waveforms.AudioRecorder.stopRecording(AudioRecorder.java)
at com.simform.audio_waveforms.AudioWaveformsPlugin.onMethodCall(AudioWaveformsPlugin.java)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(DartMessenger.java)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7815)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1094)

Steps to Reproduce:

Start audio recording using the AudioRecorder.startRecording() method.
Stop the recording using the AudioRecorder.stopRecording() method.
Observe that the app freezes and eventually triggers an ANR.

Additional Information:

Flutter Version: 3.19.1
Plugin Version: 1.0.5
Android Version: 11
Device: Vivo V20 SE

@himanshuGandhiSimform
Copy link
Collaborator

Hello, @duchl0202 if possible, can you please share the code where you are doing this? and please also share how many numbers of files you are extracting at the same time. Thank you

@himanshuGandhiSimform himanshuGandhiSimform added the waiting-for-response Waiting for someone to respond. label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-response Waiting for someone to respond.
Projects
None yet
Development

No branches or pull requests

2 participants