Closed travisgoodspeed closed 4 years ago
The following is a log of the bug as expressed in Android. This crash can be triggered reliably by hitting Refresh in the home fragment rapidly a few times, then attempting to download the codeplug.
This is without the fix from 83725aa.
2020-07-04 17:31:53.383 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Getting FreqA
2020-07-04 17:31:53.386 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Getting FreqB
2020-07-04 17:31:53.403 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Disconnecting.
2020-07-04 17:31:53.434 9190-9190/com.kk4vcz.goodspeedscattool E/RADIORESULT: VFOA=600000
2020-07-04 17:31:56.437 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Connecting
2020-07-04 17:31:56.443 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Connected
2020-07-04 17:31:56.443 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Getting FreqA
2020-07-04 17:31:56.445 9190-9227/com.kk4vcz.goodspeedscattool V/RADIORESULT: Getting FreqB
2020-07-04 17:31:56.520 9190-9227/com.kk4vcz.goodspeedscattool E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.kk4vcz.goodspeedscattool, PID: 9190
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=14; index=14
at com.kk4vcz.codeplug.radios.kenwood.TMD710GChannel.<init>(Unknown Source:204)
at com.kk4vcz.codeplug.radios.kenwood.TMD710G.readChannel(Unknown Source:50)
at com.kk4vcz.goodspeedscattool.RadioState.downloadCodeplug(RadioState.java:100)
at com.kk4vcz.goodspeedscattool.RadioTask.doInBackground(RadioTask.java:66)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
2020-07-04 17:31:56.666 9190-9227/com.kk4vcz.goodspeedscattool I/Process: Sending signal. PID: 9190 SIG: 9
Sometimes a previous transaction has left noise in the serial channel, so that a new connection fails to parse the initial strings. A better method would be to retry a few times with an init string, acknowledging a successful connection or having a hard failure if things go wrong.