Using ContentStore disables silently any StateSaver capability

Bug #1485222 reported by Didier Roche-Tolomelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Bill Filler
content-hub (Ubuntu)
Fix Released
High
Ken VanDine
ubuntu-ui-toolkit (Ubuntu)
Invalid
High
Unassigned

Bug Description

1. Create the default template project
2. Add on the page (with an id):
            TextField {
                id: foo
                StateSaver.properties: "text"
            }
3. run the app, type something in the field, xkill it, restart
-> the TextField content is restored by the StateSaver.
4. import Ubuntu.Content 1.1
-> StateSaver still works
5. add anywhere on the page:
ContentStore {
            id: appContentStore
            scope: ContentScope.App
        }
-> The state is not restored anymore (note that it may be the first time, restoring when there was no ContentStore at kill time), then it constantly fails to restore.

There is no warning or anything that reported an issue.

Tags: devexp

Related branches

tags: added: devexp
Revision history for this message
Zsombor Egri (zsombi) wrote :

The logic to delay StateSaver when URI handler is installed did not land in toolkit, so I wonder why it does disable the statesaver...

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

10:42:55 zsombi | [11:25:35] <zsombi> didrocks: if a simple ContentStore disables StateSaver, then perhabs that should be checked
                    | fiorst...
10:42:55 zsombi | [11:26:19] <zsombi> didrocks: all StateSaver does is to hook to SIGINT and SIGTERM signals to get notified when
                    | the app is killed/stopped, not more
10:42:55 zsombi | [11:26:53] <zsombi> didrocks: and then, if there're states saved, it will restore them one by one as they come
                    | alive
10:42:55 zsombi | [11:28:30] <zsombi> didrocks: there is a piece of code to which kenvandine might refer, which arises when an app
                    | is launched thru ContentHub, which delays state restoration till the URI is handled, but that piece of code is
                    | not in the toolkit, so these two components have nothing in common really

Ken, seems that Zomber thinks it's on your side, mind looking at it then? Thanks!

Revision history for this message
Ken VanDine (ken-vandine) wrote :

I can't see any way it could cause a problem with StateSaver. The ContentStore type is just a simple object with a couple of properties, no functionality of it's own. I really can't see any way it could be related.

Revision history for this message
Zsombor Egri (zsombi) wrote :

Does the ContentStore somehow alter APP_ID or applicationName? If it does, StateSaver won;t find the state feel anymore.

Revision history for this message
Zsombor Egri (zsombi) wrote :

Ehh, typos, what I wanted to say is that it won't find the state file anymore.

Revision history for this message
Sebastien Bacher (seb128) wrote :

right, so looking a bit more into the issue

the state saver code is

http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/src/Ubuntu/Components/plugin/statesaverbackend_p.cpp#L44

only sig2/15 are handled by unix handlers, the state saver triggers on sigkill (which Didier is using for testing) through the
" QObject::connect(&QuickUtils::instance(), &QuickUtils::deactivated," signal

summary of the issues
- is sigkill supposed to be handled directly like e.g sigint?
- ContentStore somehow makes the "deactivated" signal stop being triggered
- the documentation doesn't list the handled signals

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Invalid
importance: Undecided → High
Changed in content-hub (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
importance: Undecided → High
status: New → In Progress
Bill Filler (bfiller)
Changed in canonical-devices-system-image:
milestone: none → ww40-2015
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package content-hub - 0.0+15.10.20150821.2-0ubuntu1

---------------
content-hub (0.0+15.10.20150821.2-0ubuntu1) wily; urgency=medium

  [ Ken VanDine ]
  * Don't swallow QEvent::ApplicationDeactivate (LP: #1485222)
  * added hasPending property on ContentHub (LP: #1487073)
  * generate plugins.qmltypes (LP: #1483626)

 -- CI Train Bot <email address hidden> Fri, 21 Aug 2015 16:36:06 +0000

Changed in content-hub (Ubuntu):
status: In Progress → Fix Released
Bill Filler (bfiller)
Changed in canonical-devices-system-image:
status: New → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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