Darkempire78 / OpenCalc

A simple and beautiful calculator for Android
GNU General Public License v3.0
740 stars 83 forks source link

Crash when doing 600/7 #276

Closed sonalder-darlene closed 11 months ago

sonalder-darlene commented 1 year ago

Describe the bug The app crashs when I ask the operation 600 divided by 7. Other divisions or calculs don't behave like this

To Reproduce Steps to reproduce the behavior:

  1. Open the app
  2. Write 600
  3. Press on the division symbol
  4. Write 7
  5. The app crash (without pressing the equal symbol)

Expected behavior Well, do the math for me

Smartphone (please complete the following information):

ghost commented 1 year ago

Could you look up the app version (f.e. 2.3.1 or 3.0.0-beta1)? I can't reproduce this bug on version 2.3.1 and depending on the version this issue may be a duplicate of https://github.com/Darkempire78/OpenCalc/issues/265.

sonalder-darlene commented 1 year ago

3.0.0-beta1 Didn't know I was on the beta channel. I'm experimenting Obtanium to update this app through the GitHub

Nextross commented 1 year ago

Experiencing the same thing. This is the error message:

type: crash
osVersion: google/oriole/oriole:13/TQ2A.230405.003.E1/2023041100:user/release-keys
package: com.darkempire78.opencalculator:39
process: com.darkempire78.opencalculator
processUptime: 11157 + 179 ms

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
    at java.math.BigDecimal.divide(BigDecimal.java:1722)
    at e1.d$a.e(SourceFile:55)
    at e1.d$a.c(Unknown Source:0)
    at e1.d.a(SourceFile:25)
    at e1.l.g(SourceFile:106)
    at e3.a.i(Unknown Source:8)
    at q3.a0.run(Unknown Source:102)
    at kotlinx.coroutines.scheduling.a$a.run(SourceFile:79)
    Suppressed: q3.y: [x0{Cancelling}@741bb1e, Dispatchers.Default]
SubhamJena commented 1 year ago

Even I am on v3.0.0-beta1 and any input for division operation (÷) makes the app crash, just after entering the second operand.

Darkempire78 commented 11 months ago

Fixed