After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762414 - Wrong result
Wrong result
Status: RESOLVED OBSOLETE
Product: gnome-calculator
Classification: Core
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-21 21:16 UTC by Pedro Beja
Modified: 2018-05-22 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wrong result if keynumber and enter are pressed at the same time (101.72 KB, video/webm)
2016-02-21 21:16 UTC, Pedro Beja
  Details
[PATCH] Prevent expression change between solve & history display (2.66 KB, patch)
2018-04-18 14:42 UTC, Mike Walters
none Details | Review

Description Pedro Beja 2016-02-21 21:16:27 UTC
Created attachment 321793 [details]
wrong result if keynumber and enter are pressed at the same time

Forwarding from Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811503

---------------------------
Dear Maintainer,

Doing a simple integer multiplication gave wrong result.

I was trying to multiply 364*2 using arithmetic keyboard (at the righ side of a
normal keyboard).
Accidentally, after the "2", I have pressed "3" and "Enter" almost concurently.
So the multiplication was 364*23 and the result was 728 (which is wrong).

Later trying 364*2 gave 728 (correct).
Also later,  364*23 resulted to 8372 (correct).

I can not reproduce the error. Probably a timing bug.

A screenshot was taken, which you probably do not need.

I consider this bug important, because it affects the core functionality, which
is to make correct calculations.
---------------------------
by Evangelos Skarmoutsos <skarmoutsosv@gmail.com>



I am adding a screencast here to show the issue.
When I pressed the "enter" key for the result, I "accidentally" pressed "3+enter" at the same time.

thanks
regards
Pedro Beja
Comment 1 Alberto Ruiz 2016-02-22 03:47:38 UTC
I can confirm the problem on my end. I guess the code relies on the assumption that the formula didn't change after the calculation was done and is about to be displayed.

Thanks a lot for reporting, I need to find the time to fix this but it is on the top of my TODO now.
Comment 2 Mike Walters 2018-04-18 14:42:58 UTC
Created attachment 371094 [details] [review]
[PATCH] Prevent expression change between solve & history display
Comment 3 GNOME Infrastructure Team 2018-05-22 11:57:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-calculator/issues/47.