ZaraclaJ / audio_recorder

Other
180 stars 128 forks source link

java.lang.RuntimeException: start failed #6

Closed mneckoee closed 6 years ago

mneckoee commented 6 years ago

if I try start recording for two times, the first try succeeded but the second try throw exception, even the output file of the first try isn't a valid file.


01-18 14:12:27.135 18270-18270/org.crcis.nooryab E/MediaRecorder: start failed: -2147483648
01-18 14:12:27.135 18270-18270/org.crcis.nooryab E/MethodChannel#audio_recorder: Failed to handle method call
                                                                                 java.lang.RuntimeException: start failed.
                                                                                     at android.media.MediaRecorder.start(Native Method)
                                                                                     at com.jordanalcaraz.audiorecorder.audiorecorder.AudioRecorderPlugin.startRecording(AudioRecorderPlugin.java:107)
                                                                                     at com.jordanalcaraz.audiorecorder.audiorecorder.AudioRecorderPlugin.onMethodCall(AudioRecorderPlugin.java:59)
                                                                                     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
                                                                                     at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:136)
                                                                                     at android.os.MessageQueue.nativePollOnce(Native Method)
                                                                                     at android.os.MessageQueue.next(MessageQueue.java:136)
                                                                                     at android.os.Looper.loop(Looper.java:197)
                                                                                     at android.app.ActivityThread.main(ActivityThread.java:5225)
                                                                                     at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                     at java.lang.reflect.Method.invoke(Method.java:525)
                                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:741)
                                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
                                                                                     at dalvik.system.NativeStart.main(Native Method)
01-18 14:12:27.155 18270-18311/org.crcis.nooryab E/flutter: [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
                                                            PlatformException(error, start failed., null)
                                                            #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:547:7)
                                                            #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
                                                            <asynchronous suspension>
                                                            #2      AudioRecorder.start (package:audio_recorder/audio_recorder.dart:38:21)
                                                            <asynchronous suspension>
                                                            #3      _QuranState._startRecording (package:nooryab/routes/quran_page.dart:119:25)
                                                            <asynchronous suspension>
                                                            #4      _QuranState._getSearchbar.<anonymous closure> (package:nooryab/routes/quran_page.dart:137:15)
                                                            #5      TapGestureRecognizer._checkDown.<anonymous closure> (package:flutter/src/gestures/tap.dart:142:48)
                                                            #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
                                                            #7      TapGestureRecognizer._checkDown (package:flutter/src/gestures/tap.dart:142:9)
                                                            #8      TapGestureRecognizer.didExceedDeadline (package:flutter/src/gestures/tap.dart:114:5)
                                                            #9      Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
                                                            #10     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
                                                            #11     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
                                                            #12     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
mneckoee commented 6 years ago

output file of the first try 1516271552398.zip

ZaraclaJ commented 6 years ago

Can you give me a sample where i would reproduce this ?

mneckoee commented 6 years ago

I find out the problem. I started the recording again without stopping it.

sbprometteur commented 3 years ago

I find out the problem. I started the recording again without stopping it.

Can you tell me how it possible