Bug #1058061 reported by Evan on 2012-09-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Online Accounts: libaccounts-glib
Alberto Mardegan
Photos Lens
Iain Lane
libaccounts-glib (Ubuntu)
unity-lens-photos (Ubuntu)

Bug Description


This is one of the most reported error on errors.ubuntu.com, probably related to dbus not being responsive when libaccounts needs it. This properly handles the error and avoid a lens crash by disabling the failing scope.

[Test case]
No clear test case to trigger this failure.

[Regression potential]

Related branches

Robert Ancell (robert-ancell) wrote :

I think this bug is in libaccounts-glib:libaccounts-glib/ag-manager.c:
static GObject *
ag_manager_constructor (GType type, guint n_params,
                        GObjectConstructParam *params)
    GObjectClass *object_class = (GObjectClass *)ag_manager_parent_class;
    AgManager *manager;
    GObject *object;

    object = object_class->constructor (type, n_params, params);

    g_return_val_if_fail (object != NULL, NULL);

    manager = AG_MANAGER (object);
    if (G_UNLIKELY (!open_db (manager) || !setup_dbus (manager)))
        g_object_unref (object);
        return NULL;

    return object;

i.e. the database has failed to open or dbus not worked.

Robert Ancell (robert-ancell) wrote :

Trace from errors.ubuntu.com:

Traceback (most recent call last):
  File "/usr/lib/unity-lens-photos/unity-lens-photos", line 162, in <module>
    daemon = Daemon()
  File "/usr/lib/unity-lens-photos/unity-lens-photos", line 98, in __init__
    flickr (self._lens)
  File "/usr/lib/unity-lens-photos/flickr_scope.py", line 60, in __init__
    self._get_accounts_for_service ('flickr')
  File "/usr/lib/unity-lens-photos/flickr_scope.py", line 97, in _get_accounts_for_service
    self._account_manager = Accounts.Manager.new_for_service_type("sharing")
  File "/usr/lib/python3/dist-packages/gi/types.py", line 76, in constructor
    return info.invoke(cls, *args, **kwargs)
TypeError: constructor returned NULL

Changed in online-accounts-libaccounts-glib:
assignee: nobody → Alberto Mardegan (mardy)
Iain Lane (laney) wrote :

Yeah this is the same as the other one. I don't think it's a bug in libaccounts-glib; we just need to handle it.

Changed in libaccounts-glib (Ubuntu):
status: New → Incomplete
status: Incomplete → Invalid
Changed in unity-lens-photos:
assignee: nobody → Iain Lane (laney)
status: New → In Progress
David Callé (davidc3) on 2012-10-16
Changed in unity-lens-photos:
status: In Progress → Fix Committed
David Callé (davidc3) on 2012-10-16
Changed in unity-lens-photos:
importance: Undecided → High
David Callé (davidc3) on 2012-10-16
description: updated
David Callé (davidc3) on 2012-10-17
description: updated
Iain Lane (laney) wrote :

there is an easy test case that I know of:

laney@raleigh> chmod a-r ~/.config/libaccounts-glib/accounts.db
laney@raleigh> killall unity-lens-photos; ./unity-lens-photos

crashes if bad, errors but doesn't crash if good

David Callé (davidc3) on 2012-10-17
Changed in unity-lens-photos:
milestone: none → 0.9
Didier Roche (didrocks) on 2012-10-19
no longer affects: libaccounts-glib (Ubuntu Quantal)
David Callé (davidc3) on 2012-10-19
Changed in unity-lens-photos:
status: Fix Committed → Fix Released

Hello Evan, or anyone else affected,

Accepted unity-lens-photos into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity-lens-photos/0.9-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity-lens-photos (Ubuntu Quantal):
status: New → Fix Committed
tags: added: verification-needed
Timo Jyrinki (timo-jyrinki) wrote :

I've been running the fixed version for some time now and now from the -proposed, now regressions (or crashes) observed.

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-lens-photos - 0.9-0ubuntu1

unity-lens-photos (0.9-0ubuntu1) quantal-proposed; urgency=low

  * New upstream release.
    - [SRU] Default lenses results should appear above the shopping category
      (LP: #1066957)
    - TypeError:<module>:__init__:__init__:_get_accounts_for_service:constructor
      (LP: #1058061)
    - geeqie-standard crashes on start with SIGSEGV in editor_command_parse()
      when unity-lens-photos is installed (LP: #1056532)
 -- Lukasz 'sil2100' Zemczak <email address hidden> Fri, 19 Oct 2012 10:09:51 +0200

Changed in unity-lens-photos (Ubuntu Quantal):
status: Fix Committed → Fix Released
Changed in unity-lens-photos (Ubuntu):
status: New → Fix Released
Alberto Mardegan (mardy) wrote :

Removing libaccounts-glib from this released bug report.

Changed in libaccounts-glib:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers