SRU micro-release (MRE) 3.10.3 from utopic to trusty - calculator fails to do proper calculatoins after CTRL+Z and Enter

Bug #1209326 reported by userDepth on 2013-08-07
100
This bug affects 23 people
Affects Status Importance Assigned to Milestone
GNOME Calculator
Fix Released
High
gnome-calculator (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned

Bug Description

Micro-release 3.10.3 in utopic fixes Bug #1209326 and Bug #1362919.

The update fixes these issues:
    * Fix crash on super/subscript buttons
    * Fix previous answer on undo --> (Bug #1209326)
    * Fix segfault on repeated undo
    * Update translation

I've backported the package from utopic to trusty without any changes to my PPA https://launchpad.net/~amribrahim1987/+archive/ubuntu/ppa/+packages?field.name_filter=gnome-calculator&field.status_filter=published&field.series_filter=

I've attached a diff file. Please test and SRU to trusty.

[Impact]

This bug gives wrong results when undo is used.

[Test Case]

1. Open calculator and type "5000/60" followed by <Enter>. The calculator produces the right answer, 83.333...

2. Type "/60" followed by <Enter> to divide by 60 again. The calculator again produces the right answer, 1.388...

3. Press <ctrl>-Z to undo the last calculation.

4. Press <backspace> twice to delete the last "60".

5. Type "12" followed by <Enter>, to divide by 12 instead.

The calculator gives the wrong answer.

[Regression Potential]

The fixes themselves could introduce new bugs.

-----------------------------------------------------------------------------

I found this bug trying to redo a calculation. Do a calculation maybe with decimals like I did and then press CTRL+Z and hit enter and you should see the bug.

It's making a bad calculation after these steps.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: gnome-calculator 1:3.8.1-0ubuntu1
Uname: Linux 3.10.2-031002-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Wed Aug 7 13:08:05 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-07-10 (28 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: gnome-calculator
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

userDepth (markonuvo) wrote :
Jeremy Bicha (jbicha) on 2013-08-26
Changed in gnome-calculator (Ubuntu Raring):
importance: Undecided → Medium
status: New → Triaged
Changed in gnome-calculator (Ubuntu Saucy):
importance: Undecided → Medium
status: New → Triaged
Changed in gnome-calculator:
importance: Unknown → High
status: Unknown → Confirmed
floid (jkanowitz) wrote :

Glad I'm not crazy. Recorded what I thought were steps to reproduce with gnome-calculator 1:3.8.1-0ubuntu1:

Enter:
5994.34 * .50
see 5994.34 x .50 displayed
hit enter
result: 2997.17

^Z undo

see 5994.34 x .50 displayed
hit enter
result: 1498.585

^Z undo

see 5994.34 x .50 displayed
hit enter
result: 749.2925

... however it seems like state has to go crazy as indicated by the "5994.34" in "5994.34 x .50" becoming boldface like an unedited result - making the actual outcome equivalent to hitting return without editing the formula to repeat the last operation (*.50), and meaning the above steps failed to reproduce it after some fiddling where it was "not in the mood" to mistreat the formula as an untouched result as apparently indicated by showing boldface.

Nasty.

Tom Bjerck (tom-bjerck) wrote :

I can only reproduce this if I do sub calculations like:
1+1<enter>
*2<enter>
If I now alternate between <ctrl-z> and <enter> I get the successive results: "2*2", "8", "2*2", "16", "2*2", "32", ... , and not the expected succession of "2*2", "4", "2*2", "4", ...

Successive <ctrl-z><enter> sequences seems to calculate ((1+1)*2)*2, (((1+1)*2)*2)*2, ((((1+1)*2)*2)*2)*2, ...

Obviously there is an error in the code somewhere.

tags: added: trusty
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/1209326

tags: added: package-qa-testing
Changed in gnome-calculator:
status: Confirmed → Fix Released
Chris Malton (chrism-u) wrote :

Now that this is in GNOME Calculator 3.10.3, can Ubuntu please see about getting 3.10.3 pushed to the repos?

Changed in gnome-calculator (Ubuntu):
status: Triaged → Fix Released
Amr Ibrahim (amribrahim1987) wrote :

This is fixed in utopic. We need an SRU for this micro-release (MRE) for trusty.

Sebastien, could you help out with this?

Amr Ibrahim (amribrahim1987) wrote :

MRE = micro-release exception :)

Sebastien Bacher (seb128) wrote :

@Amr, there is already a gnome-calculator SRU waiting in the queue but we can update to .3 then, if you want to do the update and subscribe ubuntu-sponsors that would be great

Amr Ibrahim (amribrahim1987) wrote :

What else should I do besides subscribing ubuntu-sponsors?

summary: - calculator fails to do proper calculatoins after CTRL+Z and Enter
+ SRU micro-release 3.10.3 from utopic to trustycalculator fails to do
+ proper calculatoins after CTRL+Z and Enter
summary: - SRU micro-release 3.10.3 from utopic to trustycalculator fails to do
- proper calculatoins after CTRL+Z and Enter
+ SRU micro-release (MRE) 3.10.3 from utopic to trusty - calculator fails
+ to do proper calculatoins after CTRL+Z and Enter
Sebastien Bacher (seb128) wrote :

Work on the actual update? There is no point subscribing sponsors before there is something to review

Amr Ibrahim (amribrahim1987) wrote :

Could you guide me through this?

description: updated
Sebastien Bacher (seb128) wrote :

Sorry but I don't have the free slots to teach you about packaging, maybe read http://packaging.ubuntu.com to get started?

description: updated
Amr Ibrahim (amribrahim1987) wrote :

Here is the diff file.

@Seb, is that sufficient?

Amr Ibrahim (amribrahim1987) wrote :

Ubuntu Bug Control team, please nominate the bug for trusty. Thanks.

description: updated
no longer affects: gnome-calculator (Ubuntu Raring)
no longer affects: gnome-calculator (Ubuntu Saucy)
Gunnar Hjalmarsson (gunnarhj) wrote :

Just did that. Also changed the status to "In Progress" for now so this bug report shows up in the sponsorship queue at http://reqorts.qa.ubuntu.com/reports/sponsoring/

Changed in gnome-calculator (Ubuntu):
status: Fix Released → In Progress
Changed in gnome-calculator (Ubuntu):
status: In Progress → Fix Released
Changed in gnome-calculator (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
Gunnar Hjalmarsson (gunnarhj) wrote :

@Amr Ibrahim: I'm not a sponsor, but I had a quick glance at your patch, and I'm pretty sure it's not correct. The merge proposal that Leon Liao prepared for saucy looks much more convincing to me. If you want this to be dealt with soon, I would suggest that you try to prepare a similar merge proposal against trusty-proposed. Please note that changes may not be made to the original source directly, but you need to do it via a patch in debian/patches.

Amr Ibrahim (amribrahim1987) wrote :

OK, I have never done any packaging before. I guess I still have some reading to do :)

Anyone feel free to work on this to save time.

Chris Malton (chrism-u) wrote :

@Gunnar - Are you suggesting that the update from 3.10.2 to 3.10.3 should be provided as a patch in debian/patches? Surely this isn't the right way to package a new upstream micro release?

As per section 6 in https://wiki.ubuntu.com/StableReleaseUpdates, I believe the right way to ship this is to ship the new upstream microrelease, which I believe Amr has done, and provided a debdiff.

Where is Leon's patch for Saucy? I can't see it on this bug report.

@Amr - If I get a chance tonight and a response to the whereabouts of the patch for Saucy, I'll see if I can put a debdiff together for this.

Gunnar Hjalmarsson (gunnarhj) wrote :

On 2014-09-24 07:51, Chris Malton wrote:
> @Gunnar - Are you suggesting that the update from 3.10.2 to 3.10.3
> should be provided as a patch in debian/patches? Surely this isn't
> the right way to package a new upstream micro release?

Ok, I missed that it involves a new upstream version. Sorry.

> As per section 6 in https://wiki.ubuntu.com/StableReleaseUpdates, I
> believe the right way to ship this is to ship the new upstream
> microrelease, which I believe Amr has done, and provided a debdiff.

You may be right. I'm not familiar enough with this package to have an opinion.

> Where is Leon's patch for Saucy? I can't see it on this bug report.

It's a merge proposal. Link just below the bug description.

Chris Malton (chrism-u) wrote :

@Gunnar: Thanks for pointing me to the link.

Based on what I'm seeing, the .deb in Amr's PPA generally looks good in terms of backport. I am, however, by no means an expert in this field.

@Ubuntu Sponsors Team - Does Amr's patch look good or is there something else you need one of us to do?

Sebastien Bacher (seb128) wrote :

@Chris, Amr, thanks for the work. Ideally the debdiff would be a simple update on top of the current trusty SRU, not a backport of the utopic package (that adds some 5 changelog entries which is not required, and might included other work that is not suited for the stable serie). I can fix that when I sponsor the update if you want though

Chris Malton (chrism-u) wrote :

@Sebastien: Would the 3.10.3-0ubuntu1 release I just dput to my ppa: https://launchpad.net/~chrism-u/+archive/ubuntu/ppa be more acceptable? Please bear in mind this is my first go at an MRE SRU.

DebDiff for 3.10.2-0ubuntu1.1 to 3.10.3-0ubuntu1 attached.

Sebastien Bacher (seb128) wrote :

@Chris, a ppa version works yes, you should use "0ubuntu0.1" though, "ubuntu1" has already been used in utopic and can't be re-used for another serie

Amr Ibrahim (amribrahim1987) wrote :

I used the source from utopic because it already has the fixes for Bug #1362919 and Bug #1372412 which I think are not fixed in vanilla upstream 3.10.3.

Chris Malton (chrism-u) wrote :

Point taken Sebastien - thanks for spotting this. Right idea, wrong numbers!

I'll try that again. New debdiff attached, and I'll push a new version to the PPA in about 20-30 minutes time once the newer version number is removed.

Chris Malton (chrism-u) wrote :

Now in on https://launchpad.net/~chrism-u/+archive/ubuntu/ppa

@Sebastien - please could you review?

Sebastien Bacher (seb128) wrote :

thanks, I'm going to review that this week

Before a new SRU is accepted the current one needs to be validated/copied to update, maybe you can help confirming the fixes for bug #1362919 and bug #1372412 (you need to run trusty, install the proposed package and run the testcase/verify it behaves as it should)

Chris Malton (chrism-u) wrote :

@Sebastien, One of those I can verify OK - the other I'll need a bit more time on - primarily because I run an en-gb desktop with no extra lang packs.

Sebastien Bacher (seb128) wrote :

Thanks Chris, I can verify the translation one

Sebastien Bacher (seb128) wrote :

thanks, I'm including the revision uploaded in between and sponsoring that update

Hello checoimg, 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.3-0ubuntu0.1 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: Triaged → Fix Committed
tags: added: verification-needed
Mathew Hodson (mathew-hodson) wrote :

There is a regression when converting from decimal to hex. I filed bug #1387887.

Sebastien Bacher (seb128) wrote :

@Mathew: what number do you use? are you sure you are running the same version? the update doesn't trigger those errors here

Sebastien Bacher (seb128) wrote :

sorry, I didn't do "enter" after the conversion, I can confirm that and know how to fix it....

Sebastien Bacher (seb128) wrote :

I've uploaded a followup sru with an extra fix for the conversion issue

Chris Malton (chrism-u) wrote :

Well done Sebastien, thanks to Mathew for finding - apologies this got missed as part of SRU.

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of gnome-calculator from trusty-proposed was performed and bug 1387887 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and tag 1387887 "bot-stop-nagging". Thanks!

tags: added: verification-failed

Hello checoimg, 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.3-0ubuntu0.1.1 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!

tags: removed: verification-failed
Mathew Hodson (mathew-hodson) wrote :

Fixed with gnome-calculator 1:3.10.3-0ubuntu0.1.1 in trusty-proposed.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-calculator - 1:3.10.3-0ubuntu0.1.1

---------------
gnome-calculator (1:3.10.3-0ubuntu0.1.1) trusty; urgency=medium

  * debian/patches/git_base_change.patch:
    - don't display expression errors on base change

gnome-calculator (1:3.10.3-0ubuntu0.1) trusty; urgency=medium

  * New upstream version, drop patches included in the new version
    (lp: #1209326)
 -- Sebastien Bacher <email address hidden> Fri, 31 Oct 2014 11:20:34 +0100

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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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