Page MenuHomeGitPull.it

[Crash] NumberFormatException error
Closed, ResolvedPublic

Description

If the user enters an excessively large number as a stop number, the app ends up in error:

FATAL EXCEPTION: AsyncTask #1
Process: it.reyboz.bustorino.debug, PID: 11758
java.lang.RuntimeException: An error occurred while executing doInBackground()
 at android.os.AsyncTask$3.done(AsyncTask.java:309)
 at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
 at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
 at java.util.concurrent.FutureTask.run(FutureTask.java:242)
 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
 at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NumberFormatException: Invalid int: "676854551518484848"
 at java.lang.Integer.invalidInt(Integer.java:138)
 at java.lang.Integer.parse(Integer.java:413)
 at java.lang.Integer.parseInt(Integer.java:367)
 at java.lang.Integer.parseInt(Integer.java:334)
 at it.reyboz.bustorino.middleware.AsyncDataDownload.doInBackground(AsyncDataDownload.java:119)
 at it.reyboz.bustorino.middleware.AsyncDataDownload.doInBackground(AsyncDataDownload.java:46)
 at android.os.AsyncTask$2.call(AsyncTask.java:295)
 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 ... 4 more

Please validate the input!!!

Version of the test: 1.15.3

Thank you

Event Timeline

The same error occurs in the settings on the "Number of stops" field but here the problem is that if too large a number is saved, it is no longer possible to start the app because it immediately ends in error

fabio.mazza triaged this task as Unbreak Now! priority.Jul 22 2021, 13:16
fabio.mazza claimed this task.