maks / MGit

A Git client for Android.
https://manichord.com/projects/mgit.html
GNU General Public License v3.0
1.25k stars 167 forks source link

app crash when trying to send error report #398

Open maks opened 6 years ago

maks commented 6 years ago

This is not a common use case! Steps to repro: Give app storage permission, switch out of app and into go into system settings, remove storage write permission (which will cause app to try to request it again) then switch back to app. This causes an error dialog, if you then try to report it you get this crash.

java.lang.IllegalStateException: Cannot access ErrorReporter before ACRA#init
        at org.acra.ACRA.getErrorReporter(ACRA.java:316)
        at com.manichord.mgit.dialogs.ExceptionDialog$onStart$1.onClick(ExceptionDialog.kt:47)
        at android.view.View.performClick(View.java:6294)
        at android.view.View$PerformClick.run(View.java:24770)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
kb-1000 commented 6 years ago

@maks ACRA isn't initialized in debug mode, this means it can't send error reports.

maks commented 6 years ago

@kaeptmblaubaer1000 ah thanks, that makes sense. In that case this ticket just needs to be about disabling that button in debug builds, but thats very low priority.