Sav22999 / common-voice-android

Repository of "CV Project" app. It's an unofficial app for Mozilla Common Voice, which permits you to contribute to this project via your device.
https://www.saveriomorelli.com/commonvoice/
GNU General Public License v3.0
108 stars 18 forks source link

[BUG] Crashes when I try to record the audio #196

Open Damjan94 opened 2 years ago

Damjan94 commented 2 years ago

General information

About OS*

OS version: 12

OS language (in English):_ English

About the app (CV Project)*

App release: 2.4.0.5

App language (in English): English

About you device

Device RAM: ?

Device display size (in Inches): ?

(Optional, but recommended) _Device model SM-G955F

From what store have you installed the app?: GitHub

Are there installed Google Services on your device? No

Description bug *

How to reproduce the bug *

  1. Start to record the sentence

Screenshots

Log file

You can find the log file in the Internal storage > Android > data > org.commonvoice.saverio > files > logs > log.txt

from logfile:

java.lang.RuntimeException: start failed.
    at android.media.MediaRecorder.start(Native Method)
    at org.commonvoice.saverio_lib.mediaRecorder.MediaRecorderRepository.startRecording(MediaRecorderRepository.kt:45)
    at org.commonvoice.saverio_lib.viewmodels.SpeakViewModel.startRecording(SpeakViewModel.kt:75)
    at org.commonvoice.saverio.SpeakActivity.startRecording(SpeakActivity.kt:1207)
    at org.commonvoice.saverio.SpeakActivity.setStartStopButton$lambda-41(SpeakActivity.kt:1264)
    at org.commonvoice.saverio.SpeakActivity.lambda$RHDULYo5QS5EjyqzrExOtZM7lZk(Unknown Source:0)
    at org.commonvoice.saverio.-$$Lambda$SpeakActivity$RHDULYo5QS5EjyqzrExOtZM7lZk.onClick(Unknown Source:4)
    at android.view.View.performClick(View.java:7455)
    at android.view.View.performClickInternal(View.java:7432)
    at android.view.View.access$3700(View.java:835)
    at android.view.View$PerformClick.run(View.java:28810)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7870)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

from debugger

E/BufferQueueProducer: [ViewRootImpl[MainActivity]#1(BLAST Consumer)1](id:a8600000001,api:0,p:-1,c:2694) disconnect: not connected (req=1)
W/libEGL: EGLNativeWindowType 0x7e3fb22d70 disconnect failed
E/MediaRecorder: start failed: -2147483648
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.commonvoice.saverio, PID: 2694
    java.lang.RuntimeException: start failed.
        at android.media.MediaRecorder.start(Native Method)
        at org.commonvoice.saverio_lib.mediaRecorder.MediaRecorderRepository.startRecording(MediaRecorderRepository.kt:45)
        at org.commonvoice.saverio_lib.viewmodels.SpeakViewModel.startRecording(SpeakViewModel.kt:75)
        at org.commonvoice.saverio.SpeakActivity.startRecording(SpeakActivity.kt:1207)
        at org.commonvoice.saverio.SpeakActivity.setStartStopButton$lambda-41(SpeakActivity.kt:1264)
        at org.commonvoice.saverio.SpeakActivity.lambda$RHDULYo5QS5EjyqzrExOtZM7lZk(Unknown Source:0)
        at org.commonvoice.saverio.-$$Lambda$SpeakActivity$RHDULYo5QS5EjyqzrExOtZM7lZk.onClick(Unknown Source:4)
        at android.view.View.performClick(View.java:7455)
        at android.view.View.performClickInternal(View.java:7432)
        at android.view.View.access$3700(View.java:835)
        at android.view.View$PerformClick.run(View.java:28810)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7870)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/VariableLanguageActivity$setCustomDefaultUncaughtExceptionHandler: java.lang.RuntimeException: start failed.
        at android.media.MediaRecorder.start(Native Method)
        at org.commonvoice.saverio_lib.mediaRecorder.MediaRecorderRepository.startRecording(MediaRecorderRepository.kt:45)
        at org.commonvoice.saverio_lib.viewmodels.SpeakViewModel.startRecording(SpeakViewModel.kt:75)
        at org.commonvoice.saverio.SpeakActivity.startRecording(SpeakActivity.kt:1207)
        at org.commonvoice.saverio.SpeakActivity.setStartStopButton$lambda-41(SpeakActivity.kt:1264)
        at org.commonvoice.saverio.SpeakActivity.lambda$RHDULYo5QS5EjyqzrExOtZM7lZk(Unknown Source:0)
        at org.commonvoice.saverio.-$$Lambda$SpeakActivity$RHDULYo5QS5EjyqzrExOtZM7lZk.onClick(Unknown Source:4)
        at android.view.View.performClick(View.java:7455)
        at android.view.View.performClickInternal(View.java:7432)
        at android.view.View.access$3700(View.java:835)
        at android.view.View$PerformClick.run(View.java:28810)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7870)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/VariableLanguageActivity$setCustomDefaultUncaughtExceptionHandler: java.lang.RuntimeException: start failed.
        at android.media.MediaRecorder.start(Native Method)
        at org.commonvoice.saverio_lib.mediaRecorder.MediaRecorderRepository.startRecording(MediaRecorderRepository.kt:45)
        at org.commonvoice.saverio_lib.viewmodels.SpeakViewModel.startRecording(SpeakViewModel.kt:75)
        at org.commonvoice.saverio.SpeakActivity.startRecording(SpeakActivity.kt:1207)
        at org.commonvoice.saverio.SpeakActivity.setStartStopButton$lambda-41(SpeakActivity.kt:1264)
        at org.commonvoice.saverio.SpeakActivity.lambda$RHDULYo5QS5EjyqzrExOtZM7lZk(Unknown Source:0)
        at org.commonvoice.saverio.-$$Lambda$SpeakActivity$RHDULYo5QS5EjyqzrExOtZM7lZk.onClick(Unknown Source:4)
        at android.view.View.performClick(View.java:7455)
        at android.view.View.performClickInternal(View.java:7432)
        at android.view.View.access$3700(View.java:835)
        at android.view.View$PerformClick.run(View.java:28810)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7870)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/VariableLanguageActivity$setCustomDefaultUncaughtExceptionHandler: java.lang.RuntimeException: start failed.
        at android.media.MediaRecorder.start(Native Method)
        at org.commonvoice.saverio_lib.mediaRecorder.MediaRecorderRepository.startRecording(MediaRecorderRepository.kt:45)
        at org.commonvoice.saverio_lib.viewmodels.SpeakViewModel.startRecording(SpeakViewModel.kt:75)
        at org.commonvoice.saverio.SpeakActivity.startRecording(SpeakActivity.kt:1207)
        at org.commonvoice.saverio.SpeakActivity.setStartStopButton$lambda-41(SpeakActivity.kt:1264)
        at org.commonvoice.saverio.SpeakActivity.lambda$RHDULYo5QS5EjyqzrExOtZM7lZk(Unknown Source:0)
        at org.commonvoice.saverio.-$$Lambda$SpeakActivity$RHDULYo5QS5EjyqzrExOtZM7lZk.onClick(Unknown Source:4)
        at android.view.View.performClick(View.java:7455)
        at android.view.View.performClickInternal(View.java:7432)
        at android.view.View.access$3700(View.java:835)
        at android.view.View$PerformClick.run(View.java:28810)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7870)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Additional context

I tried this on another samsung device running android 12, and it works fine. That one has stock samsung rom. My phone has lineage os 19. What are the chances of this being another outdated library issue?

riveravaldez commented 2 years ago

Hi, I think I'm having the same issue in an old Moto E (LTE) with LineageOS 17.1-20220211-NIGHTLY-surnia, llama 9 (Android 10) with updated app (2.4.0.5) from F-Droid (just installed).

This is what I have in log.txt:

java.lang.RuntimeException: start failed. at android.media.MediaRecorder.start(Native Method) at org.commonvoice.saverio_lib.mediaRecorder.MediaRecorderRepository.startRecording(MediaRecorderRepository.kt:45) at org.commonvoice.saverio_lib.viewmodels.SpeakViewModel.startRecording(SpeakViewModel.kt:75) at org.commonvoice.saverio.SpeakActivity.startRecording(SpeakActivity.kt:1207) at org.commonvoice.saverio.SpeakActivity.setStartStopButton$lambda-41(SpeakActivity.kt:1264) at org.commonvoice.saverio.SpeakActivity.lambda$RHDULYo5QS5EjyqzrExOtZM7lZk(Unknown Source:0) at org.commonvoice.saverio.-$$Lambda$SpeakActivity$RHDULYo5QS5EjyqzrExOtZM7lZk.onClick(Unknown Source:4) at android.view.View.performClick(View.java:7259) at android.view.View.performClickInternal(View.java:7236) at android.view.View.access$3600(View.java:801) at android.view.View$PerformClick.run(View.java:27892) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)

Kind regards, let me know if there's something I could do to help.