Web Application fail to load properly every other time is launched

Bug #1362543 reported by Victor Tuson Palau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
Fix Released
Critical
Chris Coulson
1.2
Fix Released
Critical
Chris Coulson
The Webapps-core project
Invalid
Critical
Alexandre Abreu
webbrowser-app
Invalid
Critical
Alexandre Abreu
webbrowser-app (Ubuntu)
Invalid
Critical
Alexandre Abreu

Bug Description

I am testing a game called ninjaflips. Works fine the first time you launch it , but the second time wont load correctly. If you close it and try again it will launch fine and so on..

Attached logs for working and not working plus click package

Revision history for this message
Victor Tuson Palau (vtuson) wrote :
Revision history for this message
Victor Tuson Palau (vtuson) wrote :

app log when failing to load

Revision history for this message
Victor Tuson Palau (vtuson) wrote :
no longer affects: unity8
David Barth (dbarth)
Changed in webbrowser-app:
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Bill Filler (bfiller)
tags: added: rtm14 touch-2014-09-11
Changed in webbrowser-app:
importance: Undecided → High
status: New → In Progress
no longer affects: libunity-webapps
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in webbrowser-app (Ubuntu):
status: New → Confirmed
Bill Filler (bfiller)
tags: added: touch-2014-09-25
removed: touch-2014-09-11
Changed in webbrowser-app (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Olli Ries (ories)
Changed in webbrowser-app:
importance: High → Critical
Changed in webbrowser-app (Ubuntu):
importance: High → Critical
Revision history for this message
Olivier Tilloy (osomon) wrote :

Those two lines, from the failed log, seem to be relevant:

    [0828/103105:ERROR:cache_creator.cc(125)] Unable to create cache
    [0828/103105:ERROR:appcache_storage_impl.cc(1819)] Failed to open the appcache diskcache.

Changed in oxide:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

Following up discussion on IRC with Alex and Bill, there was a suspicion that this problem might be linked to the use of the SessionStorage object in the webapp container. I discarded this hypothesis by commenting out all SessionStorage-related code in WebApp.qml and verifying that the app still runs fine only every other time.

Revision history for this message
Bill Filler (bfiller) wrote :

Note the MR linked in this bug should no longer be linked as it doesn't address this issue.

Changed in webbrowser-app:
status: In Progress → Invalid
Changed in webbrowser-app (Ubuntu):
status: In Progress → Invalid
Changed in webapps-core:
importance: Undecided → Critical
tags: removed: touch-2014-09-25
Revision history for this message
Bill Filler (bfiller) wrote :

The MR should be linked to this bug:
https://bugs.launchpad.net/webapps-core/+bug/1372243

David Barth (dbarth)
tags: added: touch-2014-09-25
Changed in webapps-core:
assignee: nobody → Alexandre Abreu (abreu-alexandre)
status: New → Triaged
David Barth (dbarth)
Changed in webapps-core:
status: Triaged → In Progress
Changed in oxide:
status: Confirmed → Incomplete
Changed in oxide:
status: Incomplete → Confirmed
Changed in webapps-core:
status: In Progress → Invalid
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

This breaks because disk_cache::VerifyStats() fails the signature check for the cache stats (the actual signature appears to be all zeroes, which might suggest that the stats aren't ever serialized to disk. This happens in 2 places - on a 30 second timer and during shutdown).

How are applications stopped when you swipe them away in the app switcher?

Revision history for this message
Chris Coulson (chrisccoulson) wrote :
Changed in oxide:
status: Confirmed → Fix Released
assignee: nobody → Chris Coulson (chrisccoulson)
milestone: none → branch-1.3
Revision history for this message
Olivier Tilloy (osomon) wrote :

> How are applications stopped when you swipe them away
> in the app switcher?

QtMir calls ubuntu_app_launch_stop_application(…), which calls into Upstart’s D-Bus Stop method.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, although I'm still not entirely clear. I should rephrase my question :)

Is the application given a chance to shut down cleanly (ie, the destructors for things like the QCoreApplication and any QQmlEngines run), or is it just killed? This bug would suggest either the latter, or resources not being cleaned up properly (which would sync the application cache to disk and would have prevented this problem)

Revision history for this message
Olivier Tilloy (osomon) wrote :

I’m not sure how exactly upstart’s Stop() method is implemented, but from my observations swiping an application away from the app switcher doesn’t give it a chance to shut down cleanly, i.e. it is killed. Which explains the issue.

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.