Viewer crashes if any trophy collection packages have been removed

Bug #1049846 reported by Jason Robinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
In Progress
Low
Unassigned
Ubuntu Accomplishments System
In Progress
Low
Unassigned

Bug Description

If a user removes a trophy collection package (for example ubuntu-desktop-accomplishments) and does not restart the Accomplishments Daemon, the viewer will crash due to missing trophy images:

Traceback (most recent call last):
  File "/usr/bin/accomplishments-viewer", line 47, in <module>
    accomplishments_viewer.main()
  File "/usr/lib/python2.7/dist-packages/accomplishments_viewer/__init__.py",
line 51, in main
    window = AccomplishmentsViewerWindow.AccomplishmentsViewerWindow()
  File "/usr/lib/python2.7/dist-packages/accomplishments_viewer_lib/Window.py",
line 48, in __new__
    new_object.finish_initializing(builder)
  File "/usr/lib/python2.7/dist-packages/accomplishments_viewer/AccomplishmentsViewerWindow.py",
line 237, in finish_initializing
    self.finalise_daemon_connection()
  File "/usr/lib/python2.7/dist-packages/accomplishments_viewer/AccomplishmentsViewerWindow.py",
line 500, in finalise_daemon_connection
    self.update_views(None)
  File "/usr/lib/python2.7/dist-packages/accomplishments_viewer/AccomplishmentsViewerWindow.py",
line 828, in update_views
    icon = GdkPixbuf.Pixbuf.new_from_file_at_size(str(acc["iconpath"]), 90, 90)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 76, in constructor
    return info.invoke(cls, *args, **kwargs)
gi._glib.GError: Failed to open file

Some fault tolerance should be added for example to restart the daemon process to update configuration instead of letting the viewer crash. A daemon restart fixes the problem but end users cannot be responsible of knowing to do this.

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Here is in more detail what happens:

1. The daemon is started. It loads UDA and UCA collections.
2. User removes UDA package, so removes it's files. The daemon still has it's data kept in accomDB.
3. User starts the viewer. The viewer asks the daemon to provide it with trophy icon cache files, so the daemon clears this cache, and recreates it for bot UCA and UDA, as it still thinks both collections are installed.
4. The daemon fails to find UDA icon files, so they do not get cached.
5. The viewer tries to load the icon files cache, but it fails to find some of these icons in cache.

I think an ideal solution to this would be to get accomplishment collection packages to run accomplishments-daemon --reload when installed or removed, so that the daemon's cache would be refreshed.

Changed in ubuntu-accomplishments-system:
status: New → Confirmed
Changed in ubuntu-accomplishments-daemon:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 0.3
Changed in ubuntu-accomplishments-daemon:
milestone: 0.3 → 0.4
Revision history for this message
Matt Fischer (mfisch) wrote :

I looked into this before. The problem is that the install/remove is running under sudo and so it claims the daemon is not running. I'll investigate more.

Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-system:
assignee: nobody → Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-daemon:
assignee: nobody → Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-system:
importance: Undecided → Low
status: Confirmed → In Progress
Changed in ubuntu-accomplishments-daemon:
status: Confirmed → In Progress
Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-daemon:
assignee: Matt Fischer (mfisch) → nobody
Changed in ubuntu-accomplishments-system:
assignee: Matt Fischer (mfisch) → nobody
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.