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

java.lang.NumberFormatException #89

Closed
tianxiaogu opened this Issue Nov 2, 2017 · 3 comments

Comments

2 participants
@tianxiaogu

tianxiaogu commented Nov 2, 2017

The parseInt at UserSettingsActivity:#261 should handle very large interger.

// CRASH: com.health.openscale (pid 6003) (elapsed nanos: 5771939483589)
// Short Msg: java.lang.NumberFormatException
// Long Msg: java.lang.NumberFormatException: Invalid int: "300416523230576771213457683014051600570377573"
// Build Label: Android/sdk_google_phone_x86/generic_x86:6.0/MASTER/4088240:userdebug/test-keys
// Build Changelist: 4088240
// Build Time: 1497047463000
// java.lang.NumberFormatException: Invalid int: "300416523230576771213457683014051600570377573"
// 	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 java.lang.Integer.valueOf(Integer.java:525)
// 	at com.health.openscale.gui.activities.UserSettingsActivity$onClickListenerOk.onClick(UserSettingsActivity.java:261)
// 	at android.view.View.performClick(View.java:5198)
// 	at android.view.View$PerformClick.run(View.java:21147)
// 	at android.os.Handler.handleCallback(Handler.java:739)
// 	at android.os.Handler.dispatchMessage(Handler.java:95)
// 	at android.os.Looper.loop(Looper.java:148)
// 	at android.app.ActivityThread.main(ActivityThread.java:5417)
// 	at java.lang.reflect.Method.invoke(Native Method)
// 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
// 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
//

@tianxiaogu tianxiaogu changed the title from java.lang.NumberFormatException: Invalid int: "java.lang.NumberFormatException: Invalid int: "300416523230576771213457683014051600570377573"" to java.lang.NumberFormatException Nov 3, 2017

@oliexdev oliexdev added the bug label Nov 8, 2017

@oliexdev

This comment has been minimized.

Owner

oliexdev commented Nov 8, 2017

How did you end up with such a great number for the user height?

Anyway thanks I fixed it with commit 481eb17

@oliexdev oliexdev closed this Nov 8, 2017

@tianxiaogu

This comment has been minimized.

tianxiaogu commented Nov 8, 2017

Hi @oliexdev, thank you for taking time to fix this issue. I was evaluating my automated GUI testing tool on a set of well-maintained open source apps, and this app is one of them.

@oliexdev

This comment has been minimized.

Owner

oliexdev commented Nov 8, 2017

ok I understand 😉
well then you will definitely find more bugs in openScale because I didn't really catch all user mistakes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment