After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691891 - User panel empty on re-opening
User panel empty on re-opening
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-16 20:15 UTC by Jeremy Bicha
Modified: 2013-03-14 21:58 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
empty-user-panel.png (25.89 KB, image/png)
2013-01-16 20:15 UTC, Jeremy Bicha
  Details
error log (3.07 KB, text/plain)
2013-03-06 16:04 UTC, Ondrej Holy
  Details
Don't unref users (1000 bytes, patch)
2013-03-14 16:30 UTC, Ondrej Holy
committed Details | Review

Description Jeremy Bicha 2013-01-16 20:15:45 UTC
Created attachment 233627 [details]
empty-user-panel.png

gnome-control-center 3.7.4 or from today's jhbuild on Ubuntu 13.04 Alpha with gnome-settings-daemon 3.7.4 and accountsservice 0.6.30

1. Open the User panel
2. Click back to the "all settings" panel
3. Open the User panel again. The panel is empty. See attached screenshot
Comment 1 Matthias Clasen 2013-02-14 10:27:18 UTC
Almost certainly a proble with the fragile accountsservice startup and all the state machine it has for initial loading.
Comment 2 Ondrej Holy 2013-03-01 14:37:38 UTC
The problem is that we are waiting for signal notify::is-loaded, but accountsservice won't emit the signal, because the user manager is already loaded. We can load users manual: 

if (act_user_manager_can_switch (d->um)) {
    users_loaded (d->um, NULL, d);
} else {
    g_signal_connect (d->um, "notify::is-loaded", G_CALLBACK (users_loaded), d);
} 

..unfortunately this solves problem only for first several attempts and then fails also, but it is probably accountsservice bug.
Comment 3 Matthias Clasen 2013-03-04 12:36:18 UTC
sounds right at first glance, I wonder in what way that fails - do you get warnings, or the list just stays empty again ?
Comment 4 Ondrej Holy 2013-03-06 16:04:01 UTC
Created attachment 238209 [details]
error log

List doesn't stay empty, it contains pointers to user accounts (same as before), however pointed memory is probably fried or corrupted. Only my user account is loaded, but with some critical errors. 

I have attached related program output...
Comment 5 Ray Strode [halfline] 2013-03-14 14:54:41 UTC
act_user_manager_can_switch isn't the right api to use.  The only thing we provide at the moment to test loaded status is the is-loaded property, so the code would need to use g_object_get (G_OBJECT (d->um), "is-loaded", &is_loaded, NULL);

Re the corruption, looking in the code the objects in the list returned from act_user_manager_list_users gets unrefed, but the act_user_manager_list_users call doesn't ref them.  This is complicated by the fact that it's documented as being (transfer full).
Comment 6 Ondrej Holy 2013-03-14 16:27:35 UTC
(In reply to comment #5)
> act_user_manager_can_switch isn't the right api to use.  The only thing we
> provide at the moment to test loaded status is the is-loaded property, so the
> code would need to use g_object_get (G_OBJECT (d->um), "is-loaded", &is_loaded,
> NULL);

Ok, I have just realized that patch have been commited in this way with Matthias...
Comment 7 Ondrej Holy 2013-03-14 16:30:54 UTC
Created attachment 238904 [details] [review]
Don't unref users

> Re the corruption, looking in the code the objects in the list returned from
> act_user_manager_list_users gets unrefed, but the act_user_manager_list_users
> call doesn't ref them.  This is complicated by the fact that it's documented as
> being (transfer full).

So, there is probably fix for that if I have understood it right :-)
Comment 8 Ray Strode [halfline] 2013-03-14 16:57:31 UTC
that patch should work, but we'll also have to update the accountsservice annotation and fix any other callers that unref
Comment 9 Ray Strode [halfline] 2013-03-14 21:57:14 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > act_user_manager_can_switch isn't the right api to use.  The only thing we
> > provide at the moment to test loaded status is the is-loaded property, so the
> > code would need to use g_object_get (G_OBJECT (d->um), "is-loaded", &is_loaded,
> > NULL);
> 
> Ok, I have just realized that patch have been commited in this way with
> Matthias...

ah indeed, he already wrote it and Rui commited a couple months ago, here:

https://git.gnome.org/browse/gnome-control-center/commit/?id=8cc06f8413cc90c964daf68ba4654ba2199e198e