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

Programmer Mode crashes on inputs larger than max 32-bit signed int #87

Closed
davjgardner opened this issue Oct 9, 2023 · 1 comment · Fixed by #91
Closed

Programmer Mode crashes on inputs larger than max 32-bit signed int #87

davjgardner opened this issue Oct 9, 2023 · 1 comment · Fixed by #91
Assignees
Labels
bug Something isn't working programmer Issues, pull requests or discussions concerning the programmer mode

Comments

@davjgardner
Copy link

Steps to reproduce:

  1. Select Programmer mode
  2. Tap "Hex"
  3. Input number larger than max 32-bit signed int (e.g. 80000000 or FEEDFACE)
  4. Press "="

Stack trace:

type: crash
osVersion: google/barbet/barbet:13/TQ3A.230901.001/2023100300:user/release-keys
package: yetzio.yetcalc:11
process: yetzio.yetcalc
processUptime: 77688 + 719 ms
installer: com.android.packageinstaller

java.lang.NumberFormatException: For input string: "FEEDFACE"
at java.lang.Integer.parseInt(Integer.java:747)
at yetzio.yetcalc.views.ProgramCalcActivity.onClick(ProgramCalcActivity.kt:589)
at android.view.View.performClick(View.java:7542)
at android.view.View.performClickInternal(View.java:7519)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:29476)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)

GrapheneOS on Pixel 5a

@davjgardner
Copy link
Author

I would recommend at least using the long datatype for 64-bit integer precision, if not some sort of BigInteger/arbitrary precision number format. Bumping up the precision might also fix #54 which looks to me like a floating point precision rounding error.

@Yet-Zio Yet-Zio self-assigned this Oct 30, 2023
@Yet-Zio Yet-Zio added programmer Issues, pull requests or discussions concerning the programmer mode bug Something isn't working labels Oct 30, 2023
@Yet-Zio Yet-Zio mentioned this issue Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working programmer Issues, pull requests or discussions concerning the programmer mode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants