Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch large values for duration #100

Closed
licaon-kter opened this issue Dec 12, 2019 · 2 comments
Closed

Catch large values for duration #100

licaon-kter opened this issue Dec 12, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@licaon-kter
Copy link
Contributor

licaon-kter commented Dec 12, 2019

1.5.2 app/server

Duration 99999999 minutes -> Share period is too long!

Duration 99999999 hours or days -> Connection established but the Your location share has expired pops-up right away -> OK -> OK again in the "established" dialogue

In the error dialogue do state what are the min/max values.

And the crashes eg. Duration 9999999999999999999999999 minutes...

12 12:44:38.455  6101  6101 D AndroidRuntime: Shutting down VM
12-12 12:44:38.456  6101  6101 E AndroidRuntime: FATAL EXCEPTION: main
12-12 12:44:38.456  6101  6101 E AndroidRuntime: Process: info.varden.hauk, PID: 6101
12-12 12:44:38.456  6101  6101 E AndroidRuntime: java.lang.IllegalStateException: Could not execute method for android:onClick
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:402)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.view.View.performClick(Unknown Source:17)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.view.View.performClickInternal(Unknown Source:3)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.view.View.access$3500(Unknown Source:0)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.view.View$PerformClick.run(Unknown Source:8)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.os.Handler.handleCallback(Unknown Source:2)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Unknown Source:4)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.os.Looper.loop(Unknown Source:242)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at android.app.ActivityThread.main(Unknown Source:98)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(Unknown Source:275)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:397)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	... 11 more
12-12 12:44:38.456  6101  6101 E AndroidRuntime: Caused by: java.lang.NumberFormatException: For input string: "99999999999999999999999999"
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at java.lang.Integer.parseInt(Integer.java:618)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at java.lang.Integer.parseInt(Integer.java:650)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	at info.varden.hauk.ui.MainActivity.startSharing(MainActivity.java:180)
12-12 12:44:38.456  6101  6101 E AndroidRuntime: 	... 13 more
@bilde2910 bilde2910 added the bug Something isn't working label Dec 12, 2019
@bilde2910
Copy link
Owner

Sounds like an integer overflow issue. I'll have to investigate this more closely.

@bilde2910
Copy link
Owner

Fixed. Will prompt when the duration is invalid now.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants