gnome-calculator 3.10.2 report "incorrect expression" when switching from hexa to decimal

Bug #1362919 reported by exebetche on 2014-08-29
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GNOME Calculator
Fix Released
Medium
gnome-calculator (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned

Bug Description

* Impact

base changes lead to errors

* Test case
- open gnome-calculator
- choose "Programming mode"
- choose "decimal" and enter a decimal number
- choose "hexadecimal" to convert the number in hexa

-> then try to put and other hexadecimal number and you get the error, you shouldn't

* Regression potential

Check that base changes still work correctly

exebetche (guillaume-lemaout) wrote :

Here is the error output:
** (gcalctool:4245): CRITICAL **: string_splice: assertion '_tmp18_ <= _tmp19_' failed

** (gcalctool:4245): CRITICAL **: string_get_next_char: assertion 'self != NULL' failed

** (gcalctool:4245): CRITICAL **: string_splice: assertion '_tmp18_ <= _tmp19_' failed

** (gcalctool:4245): CRITICAL **: string_get_next_char: assertion 'self != NULL' failed

Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in gcalctool (Ubuntu):
importance: Undecided → Low
exebetche (guillaume-lemaout) wrote :

Thank you for your response, here's the link:
https://bugzilla.gnome.org/show_bug.cgi?id=735654

Sebastien Bacher (seb128) wrote :

thanks

Changed in gcalctool (Ubuntu):
status: New → Triaged
Changed in gcalctool:
importance: Unknown → Medium
status: Unknown → New
Changed in gcalctool:
status: New → Fix Released
Changed in gcalctool (Ubuntu):
status: Triaged → Fix Committed
Denis-Carl Robidoux (deniscarl) wrote :

bugzilla 735654 reports that the fix will be released only in the next major release....

hex-decimal-hex conversions always has been a must for an OS, will I have to downgrade my version of Ubuntu to be able to work until next major release?

Sebastien Bacher (seb128) wrote :

I've backported the fix to utopic and uploaded a SRU for trusty as well

description: updated
affects: gcalctool → gnome-calculator
affects: gcalctool (Ubuntu) → gnome-calculator (Ubuntu)
Changed in gnome-calculator (Ubuntu):
status: Fix Committed → Fix Released
summary: - gcalctool 3.10.2 report "incorrect expression" when switching from hexa
- to decimal
+ gnome-calculator 3.10.2 report "incorrect expression" when switching
+ from hexa to decimal
description: updated

Hello exebetche, or anyone else affected,

Accepted gnome-calculator into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gnome-calculator/1:3.10.2-0ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gnome-calculator (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Chris Malton (chrism-u) wrote :

Looks good from here - can't reproduce this specific bug.

Tested 3.10.2-0ubuntu1.2

tags: added: verification-done
removed: verification-needed
exebetche (guillaume-lemaout) wrote :

I can't concur, now I get the error "Unknow variable « ansa »" when I go trought theses steps. At least it is not a critical error and the UI still respond.

exebetche (guillaume-lemaout) wrote :

I think the logic here is that you have to "unselect" a result by pressing Enter so it doesn't appear bold before you can edit it. I would prefer that it unselect itself when you edit it but that just my opinion. But now, if I reproduce these step:
- choose "decimal" and enter a decimal number
- choose "hexadecimal" to convert the number in hexa
- press Enter to "unselect" the result to be able to edit it, it display the value in decimal again unselected

Maybe the logic should be to capture the whole actual input, regardless of whet "selected" or not? I think that's what most people would expect, like in an actual calculator: what you see in the input is what is used for the calcul.

Chris J Arges (arges) wrote :

@exebetche

I can reproduce this issue:

1) Enter Hexadecimal Mode in Programmer Mode in the calculator
2) type a hex number, hit enter key
3) append another hex value to the end and hit enter

Here you'll see 'Unknown variable 'ansX'' where X is what you appended to the value
Note that Decimal mode doesn't behave like this, when you start typing after a value is entered it overwrites it.

I'm marking this verification-failed until either this can be fixed properly, or another bug is filed to track this new issue.

Thanks

tags: added: verification-failed
removed: verification-done
Changed in gnome-calculator (Ubuntu Trusty):
status: Fix Committed → In Progress
Sebastien Bacher (seb128) wrote :

setting as verification-done, the fix might not resolve all cases but it does resolve the one from the bug description, there is no reason to block a valid update that fix an issue and translations just because it doesn't fix another problem, open a new bug about that one and we can look at getting it resolved in another update

tags: added: verification-done
removed: verification-failed
exebetche (guillaume-lemaout) wrote :

Roger that.

Changed in gnome-calculator (Ubuntu Trusty):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-calculator - 1:3.10.2-0ubuntu1.2

---------------
gnome-calculator (1:3.10.2-0ubuntu1.2) trusty; urgency=medium

  * debian/patches/git_base_change.patch:
    - don't display expression errors on base change (lp: #1362919)
  * debian/patches/unity_classic_menubar.patch: update the potfiles list so
    the menubar strings are translatable (lp: #1372412)
 -- Sebastien Bacher <email address hidden> Mon, 22 Sep 2014 13:46:30 +0200

Changed in gnome-calculator (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for gnome-calculator has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Mathew Hodson (mathew-hodson) wrote :

The "Unknown variable" issue is being tracked in bug #1380561

tags: added: trusty
Changed in gnome-calculator (Ubuntu):
importance: Low → Medium
Changed in gnome-calculator (Ubuntu Trusty):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.