Application state is not maintained when killed

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
6 years ago
6 months ago

People

(Reporter: mschwart, Unassigned)

Tracking

({meta})

unspecified
Other
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:-)

Details

(Reporter)

Description

6 years ago
For example: Go the Messaging app, start composing a message, go back to the Homescreen and load a bunch of apps until Messaging is killed by LMK.  Our message is lost.  Apps need to save state so they can return after being killed (by LMK).

Very normal usecases just as receiving a phone call or email message could result in LMK running and some other app state being lost.
+1
blocking-b2g: --- → leo?
Note that the app gets no chance to save state once the kernel decides that its going to kill it. The kernel does a kill -9

So this means that the state needs to be saved on each mouse/touch/key event, or possibly when the system goes idle. in which case you'll only lose whatever was entered since the last idle event.
Saving state when seeing a visibilitychange event to hidden is the best approach.  We even built support into gecko for processes to hold fg priority for a little bit after being backgrounded, so they could more safely save state.
/me tempted to mark comment 2 hidden lest some web devs see it ;)
I agree - visibility change seems like a reasonable compromise :)

I made that comment hoping that nobody would actually be foolish enough to try...
blocking-b2g: leo? → ---
(putting leo? back as I assume the clearing was an accident)
blocking-b2g: --- → leo?
This can't happen in 1.1 for every app in the OS. I recommend working with the Product team to slot this into a release, and filing bugs for the specific apps that need this functionality.
blocking-b2g: leo? → -
Keywords: meta

Comment 8

6 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.