Saved calculations are lost when the app is closed

Bug #1188292 reported by Michael Hall on 2013-06-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Calculator App
Mihir Soni
qtubuntu (Ubuntu)

Bug Description

If you tear off a calculation, then close the app, when you re-open it the torn off calculation is gone

Update: we've decided for now to save calculations when they are torn-off. A more elegant (but more complex) solution would be to save when the equals are entered, but we should probably wait until the Application Lifecycle spec lands on the platform to implement this properly when the app is notified to be shutdown and given some time to do the cleanup before closing down.

Related branches

Michael Hall (mhall119) wrote :

Calculations seem to be saved to disk on exit, but the Ubuntu Touch shell simply kills the process.

You can re-create this on the desktop by running the app from the command line, and killing it from the command line, instead of closing the window.

The solution would be to save to disk whenever = is pressed at a minimum, or even after every chance to the current calculation

Changed in ubuntu-calculator-app:
status: New → Confirmed
Dalius (dalius-sandbox) wrote :

That's just wrong. While save operation is not very expensive it might be noticeable. If we look into the future it is not unusual to save app state on app exit as there might be more information to save (not calculator app, but overall). Ubuntu Touch should handle this properly.

Sam Bull (dreamsorcerer) wrote :

Presumably the shell just sends the KILL signal, couldn't the SDK catch the signal and tell the app to exit normally at this point?

Dalius (dalius-sandbox) wrote :

Question. How to reassign this problem to SDK team? That's just wrong that you can't perform some operation on exit. Android can do that, iOS can do that, Symbian can do that, BB10 can do that, Ubuntu Phone wants to be unique snowflake?

David Planella (dpm) wrote :

Some more context from the IRC conversation this morning:

<dpm> morning Saviq. We've got a bug in the calculator app that is caused by the shell killing the process on exit without notification. I'm not sure what the best project to add a bug task for might be. Do you have any suggestions? It's bug 1188292
<Saviq> dpm, it's something the app lifecycle will handle - apps will be given some grace period to save their data / serialize their state
 dpm, after that they're stopped and the process is not guaranteed to be started again
<dpm> Saviq, gotcha. Do you know where the bugs for app lifecycle are tracked? Is it platform-api?
<Saviq> dpm, I don't think there's any place yet, as the whole thing isn't built yet
<greyback> dpm: please log in "qtubuntu" package for now

Mihir Soni (mihirsoni) on 2013-07-19
Changed in ubuntu-calculator-app:
assignee: nobody → mihir (mihirsoni-123)
assignee: mihir (mihirsoni-123) → nobody
Nicholas Skaggs (nskaggs) wrote :

I tried sending SIGUP SIGTERM and SIGKILL, and the app isn't able to close gracefully. Sending the XEvent for close, as noted, does work.

David Planella (dpm) on 2013-08-07
Changed in ubuntu-calculator-app:
importance: Undecided → High
status: Confirmed → Triaged
Michael Hall (mhall119) wrote :

In the short term, let's save on every tear-off event just to make sure those are being saved

Mihir Soni (mihirsoni) on 2013-08-21
Changed in ubuntu-calculator-app:
assignee: nobody → Mihir Soni (mihirsoni-123)
status: Triaged → In Progress
David Planella (dpm) on 2013-08-21
description: updated

Fix committed into lp:ubuntu-calculator-app at revision None, scheduled for release in ubuntu-calculator-app, milestone alpha-1

Changed in ubuntu-calculator-app:
status: In Progress → Fix Committed
David Planella (dpm) on 2013-08-27
Changed in ubuntu-calculator-app:
status: Fix Committed → Fix Released
Michał Sawicz (saviq) on 2017-03-13
affects: qtubuntu → qtubuntu (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers