sunilpaulmathew / Translator

An android application to help translate other apps
GNU General Public License v3.0
107 stars 47 forks source link

Bug: crash while reporting crash #31

Open ghost opened 2 years ago

ghost commented 2 years ago

java.lang.ArrayIndexOutOfBoundsException: length=33; index=-1 at java.util.ArrayList.get(ArrayList.java:439) at t1.e.onClick(:3) at androidx.appcompat.app.AlertController$c.handleMessage(Unknown Source:37) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at java.io.Writer.write(Writer.java:157) at z1.j.a(Unknown Source:5) at z1.a.a(:4) at in.sunilpaulmathew.sCommon.Activities.sCrashReporterActivity.onBackPressed(Unknown Source:0) at x1.a.onClick(:3) at android.view.View.performClick(View.java:7455) at android.view.View.performClickInternal(View.java:7432) at android.view.View.access$3600(View.java:810) at android.view.View$PerformClick.run(View.java:28312) 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:7669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

sunilpaulmathew commented 2 years ago

@AbsurdUsername Thanks. The first one rarely happened. I'll look for it. And the second: basically harmless (except destroying the original crash report)

sunilpaulmathew commented 2 years ago

I've been using it more and the first bug keeps showing. Doesn't seem rare, and makes it quite difficult to use the app

Edit: I'm on android 11, custom rom

Then, I'll have to seriously look on it. Haven't been used it for a while.

sunilpaulmathew commented 2 years ago

Also while we're at it, I noticed the app puts every string between quotes, like:

<string name="example">"this is an example string"</string>

Which is intentional. It will help us to handle a lot of special characters much easily.

sunilpaulmathew commented 2 years ago

Not really required as these quotes doesn't make any issues. Moreover, disabling it will necessitates additional work to check illegal characters.