Corrupt QML cache - Apps Fail to start

Bug #1560020 reported by Dubstar_04
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
High
Michał Sawicz
qtmir (Ubuntu)
Triaged
High
Nick Dedekind
ubuntu-app-launch (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I recently had an issue with Telegram not starting. On launching the app I was presented with a white screen, nothing else.

I deleted ~.cache/com.ubuntu.telegram and the app data from ~.local/share/com.ubuntu.telegram.

Following this the app started but crashed when trying to login.

The issue was finally resolved by deleting the QML cache from ~.cache/QML/Apps

It seems as though the QML cache has become corrupt.

In the event of this happening again I will provide a copy of the QML cache.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report. Setting to confirmed, another user reported a similar issue on the ubuntu-phone mailing list with the dialler app and clearing the cache manually allowed the app to start.

Changed in canonical-devices-system-image:
assignee: nobody → kevin gunn (kgunn72)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
kevin gunn (kgunn72) wrote :

I'll make a suggestion here to get some comments, but it seems to me there's 2 threads to chase
1) actually figure out why the cache is getting corrupted
2) create some detection as part of the launch (ual? or qtmir?) to determine if there are issues and then delete the cache & make a second launch attempt

Changed in qtmir (Ubuntu):
assignee: nobody → Nick Dedekind (nick-dedekind)
Changed in ubuntu-app-launch (Ubuntu):
assignee: nobody → Ted Gould (ted)
Changed in qtmir (Ubuntu):
importance: Undecided → High
Changed in ubuntu-app-launch (Ubuntu):
importance: Undecided → High
Revision history for this message
Gerry Boland (gerboland) wrote :

QtMir has code that should delete the cache, if the app stops unexpectedly (i.e. probably crashed).

The QML cache system also does a CRC check on the cache file, to check it before using it. So the file being munged unexpectedly should not be a fatal condition.

Instead, if the app is itself corrupting the cache somehow, it would be good to know why. Certainly if the app crashes on startup while reading its cache, QtMir should delete the cache so the next execution will succeed.

Would be worth verifying this is functioning as expected.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in ubuntu-app-launch (Ubuntu):
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I just duped over a number of these reports, clearly we are not properly removing the cache when the app fails to start.

no longer affects: ubuntu-app-launch (Ubuntu)
Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
assignee: kevin gunn (kgunn72) → Michał Sawicz (saviq)
milestone: none → 11
status: Confirmed → Triaged
Changed in qtmir (Ubuntu):
status: Confirmed → Triaged
Changed in canonical-devices-system-image:
milestone: 11 → none
status: Triaged → Confirmed
Revision history for this message
Michał Sawicz (saviq) wrote :

It's also possible that u-a-l doesn't give qtmir notice that the app indeed failed to start. I don't think we're clearing the cache on *any* crash, just on startup - maybe we need to be more aggressive with that.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu-app-launch (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrea Bernabei (faenil) wrote :

Wouldn't clearing the cache at every crash just hide the problem under the carpet?

Revision history for this message
Michał Sawicz (saviq) wrote :

Well, if we get a report of the crash through errors.u.c, maybe not? Better for the app to start next time or not?

Revision history for this message
Michał Sawicz (saviq) wrote :

That's assuming the QML cache is at fault in the first place - if the app just crashes on its own accord, clearing the cache or not doesn't really matter.

Thing is, in case the cache is corrupt, but the app is dynamic - it will start but then crash after the user opened some new page with a new qml file - and there's no way other than upgrading the app that this will get better.

Revision history for this message
Andrea Bernabei (faenil) wrote :

My fear is that by cleaning the cache every crash we're just postponing assigning someone to actually fixing the QML cache problems :/

(of course, as you say, it may be that it's not the QML cache at fault, but we know that there's something wrong going on there almost for sure, right? so many bug reports with the same fix)

Revision history for this message
Michał Sawicz (saviq) wrote :

Sure, I'm not saying there isn't a problem in the cache, just saying the user doesn't care - and we should do everything in our power to get the app to start again. IMO that's orthogonal to the fact that we need to investigate how the QML cache gets corrupted.

Revision history for this message
Andrea Bernabei (faenil) wrote :

of course!

Revision history for this message
Ted Gould (ted) wrote :

The UAL signal for failing on starting would only be before the process starts executing. So basically everything up to passing off to the Exec line in the desktop file. After that we pretty much lose track of the process. So I don't think that UAL can really be used to tell whether the app failed because of a corrupt cache or not since it wouldn't be known until the Qt parts start executing.

Changed in ubuntu-app-launch (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Invalid
Changed in canonical-devices-system-image:
milestone: none → 12
Revision history for this message
Ted Gould (ted) wrote :

Thinking about this more, we can get the status code that is returned by the utility. If we wanted to return a custom status code for "delete the QML cache" we could do that.

Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
milestone: 12 → backlog
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.