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 721868 - message = '"this._sessionMenuButton is undefined"
message = '"this._sessionMenuButton is undefined"
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-09 15:17 UTC by Ray Strode [halfline]
Modified: 2014-01-13 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
loginDialog: defer loading user list until idle (3.29 KB, patch)
2014-01-09 15:46 UTC, Ray Strode [halfline]
committed Details | Review
loginDialog: move user list loading after actors are constructed (6.23 KB, patch)
2014-01-10 14:35 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2014-01-09 15:17:30 UTC
Downstream report for a version of gnome-shell 3.8.4 with large chunks of the login screen from 3.10 backported.  From code inspection, I think the problem affects master, too, though I haven't ever hit the issue.

Jan 08 13:43:09 dhcp131-108.brq.redhat.com gnome-session[2232]: (gnome-settings-daemon:3428): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Jan 08 13:43:09 dhcp131-108.brq.redhat.com colord[3548]: Automatic metadata add icc-11ce9c255b9540870b93a5dad0fbf897 to xrandr-NEC Corporation-E231W-19110999NB
Jan 08 13:43:09 dhcp131-108.brq.redhat.com colord[3548]: Profile added: icc-11ce9c255b9540870b93a5dad0fbf897
Jan 08 13:43:09 dhcp131-108.brq.redhat.com colord[3548]: Automatic metadata add icc-2967770f7d5b6c590ae524ba654abda8 to xrandr-AU Optronics
Jan 08 13:43:09 dhcp131-108.brq.redhat.com colord[3548]: Profile added: icc-2967770f7d5b6c590ae524ba654abda8
Jan 08 13:43:13 dhcp131-108.brq.redhat.com NetworkManager[979]: <info> (virbr0): link disconnected (calling deferred action)
Jan 08 13:43:27 dhcp131-108.brq.redhat.com polkitd[1082]: Registered Authentication Agent for unix-session:c1 (system bus name :1.31 [gnome-shell --mode=gdm], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jan 08 13:43:27 dhcp131-108.brq.redhat.com gnome-session[2232]: JS LOG: GNOME Shell started at Wed Jan 08 2014 13:43:27 GMT+0100 (CET)
Jan 08 13:43:28 dhcp131-108.brq.redhat.com systemd[1]: Starting Stop Read-Ahead Data Collection...
Jan 08 13:43:29 dhcp131-108.brq.redhat.com systemd[1]: Started Stop Read-Ahead Data Collection.
Jan 08 13:43:29 dhcp131-108.brq.redhat.com dbus-daemon[1041]: dbus[1041]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com dbus[1041]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com systemd[1]: Starting Fingerprint Authentication Daemon...
Jan 08 13:43:29 dhcp131-108.brq.redhat.com dbus-daemon[1041]: dbus[1041]: [system] Successfully activated service 'net.reactivated.Fprint'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com dbus[1041]: [system] Successfully activated service 'net.reactivated.Fprint'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com systemd[1]: Started Fingerprint Authentication Daemon.
Jan 08 13:43:29 dhcp131-108.brq.redhat.com fprintd[3686]: Launching FprintObject
Jan 08 13:43:29 dhcp131-108.brq.redhat.com fprintd[3686]: ** Message: D-Bus service launched with name: net.reactivated.Fprint
Jan 08 13:43:29 dhcp131-108.brq.redhat.com fprintd[3686]: ** Message: entering main loop
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: JS ERROR: !!!   Exception in callback for signal: reset
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: JS ERROR: !!!     message = '"this._sessionMenuButton is undefined"'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/gdm/loginDialog.js"'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: JS ERROR: !!!     lineNumber = '627'
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: JS ERROR: !!!     stack = '"([object Object],0)@/usr/share/gnome-shell/js/gdm/loginDialog.js:627
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper([object Object],0)@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: _emit("reset",0)@/usr/share/gjs-1.0/signals.js:124
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ()@/usr/share/gnome-shell/js/gdm/authPrompt.js:463
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper()@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ()@/usr/share/gnome-shell/js/gdm/loginDialog.js:559
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper()@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ()@/usr/share/gnome-shell/js/gdm/loginDialog.js:932
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper()@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object GObject_Object])@/usr/share/gnome-shell/js/gdm/loginDialog.js:533
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper([object GObject_Object])@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object GObject_Object])@/usr/share/gjs-1.0/lang.js:154
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object GObject_Object])@/usr/share/gjs-1.0/lang.js:248
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: (true,true)@/usr/share/gnome-shell/js/ui/screenShield.js:925
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper(true,true)@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ()@/usr/share/gnome-shell/js/ui/screenShield.js:871
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: wrapper()@/usr/share/gjs-1.0/lang.js:213
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object Object])@/usr/share/gnome-shell/js/ui/main.js:214
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: _emit("startup-prepared")@/usr/share/gjs-1.0/signals.js:124
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object Object])@/usr/share/gnome-shell/js/ui/layout.js:599
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: _emit("loaded")@/usr/share/gjs-1.0/signals.js:124
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object GObject_Object])@/usr/share/gnome-shell/js/ui/background.js:673
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: ([object GObject_Object],[object GObject_Object])@/usr/share/gnome-shell/js/ui/background.js:206
Jan 08 13:43:29 dhcp131-108.brq.redhat.com gnome-session[2232]: "'
Jan 08 13:43:59 dhcp131-108.brq.redhat.com systemd[1]: Starting Getty on tty2...
Jan 08 13:43:59 dhcp131-108.brq.redhat.com systemd[1]: Started Getty on tty2.
Jan 08 13:44:00 dhcp131-108.brq.redhat.com fprintd[3686]: ** Message: No devices in use, exit
Jan 08 13:44:01 dhcp131-108.brq.redhat.com dbus-daemon[1041]: dbus[1041]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jan 08 13:44:01 dhcp131-108.brq.redhat.com dbus[1041]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jan 08 13:44:01 dhcp131-108.brq.redhat.com systemd[1]: Starting Fingerprint Authentication Daemon...
Jan 08 13:44:01 dhcp131-108.brq.redhat.com dbus-daemon[1041]: dbus[1041]: [system] Successfully activated service 'net.reactivated.Fprint'
Jan 08 13:44:01 dhcp131-108.brq.redhat.com dbus[1041]: [system] Successfully activated service 'net.reactivated.Fprint'
Jan 08 13:44:01 dhcp131-108.brq.redhat.com fprintd[3690]: Launching FprintObject
Jan 08 13:44:01 dhcp131-108.brq.redhat.com systemd[1]: Started Fingerprint Authentication Daemon.
Jan 08 13:44:01 dhcp131-108.brq.redhat.com fprintd[3690]: ** Message: D-Bus service launched with name: net.reactivated.Fprint
Jan 08 13:44:01 dhcp131-108.brq.redhat.com fprintd[3690]: ** Message: entering main loop
Jan 08 13:44:04 dhcp131-108.brq.redhat.com systemd[1]: Starting user-0.slice.
Jan 08 13:44:04 dhcp131-108.brq.redhat.com systemd[1]: Created slice user-0.slice.
Jan 08 13:44:04 dhcp131-108.brq.redhat.com systemd[1]: Starting Session 1 of user root.
Jan 08 13:44:04 dhcp131-108.brq.redhat.com systemd-logind[998]: New session 1 of user root.
Jan 08 13:44:04 dhcp131-108.brq.redhat.com systemd[1]: Started Session 1 of user root.
Jan 08 13:44:04 dhcp131-108.brq.redhat.com login[3688]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Jan 08 13:44:04 dhcp131-108.brq.redhat.com login[3688]: ROOT LOGIN ON tty2
Jan 08 13:44:32 dhcp131-108.brq.redhat.com fprintd[3690]: ** Message: No devices in use, exit
Comment 1 Ray Strode [halfline] 2014-01-09 15:22:27 UTC
So what's going on is there's a race at startup.  We either call _loadUserList directly from the constructor or we call it later after the user manager is loaded. _loadUserList calls authPrompt.reset() which causes the onReset handler to get invoked which then pokes at actors that aren't set up until after _loadUserList finishes.

The best fix, imo, is to make _loadUserList get called from an idle handler.  That way we introduce symmetry in the userManager.is_loaded and !userManager.is_loaded cases.  _loadUserList will get called in both cases after going back to the main loop.
Comment 2 Ray Strode [halfline] 2014-01-09 15:46:16 UTC
Created attachment 265851 [details] [review]
loginDialog: defer loading user list until idle

In some cases we load the user list after going back
to main loop and in other cases we load the user list
right away (depending on if accounts service is ready).

In the case we load the user list right away we cause a
traceback because loading the user list forces a reset,
which then tries to reset actors which aren't instantiated
yet.

This commit ensures the user list is loaded after the constructor
finishes and the event loop runs irregardless of the accountsservice
state.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-01-09 22:31:02 UTC
Review of attachment 265851 [details] [review]:

This makes sense, but is there any reason we just don't construct all the actors first? Move the code down a bit?
Comment 4 Ray Strode [halfline] 2014-01-10 14:26:16 UTC
not that i can think of
Comment 5 Ray Strode [halfline] 2014-01-10 14:35:58 UTC
Created attachment 265928 [details] [review]
loginDialog: move user list loading after actors are constructed

Right now we queue populating the user list in the middle of setting
up the dialog actors. Of course, the actual population happens some time
later after going back to the main loop.

It's more logical to structure the code so the the actors are
instantiated first in one block and then other things after that.

This commit moves the user list population enqueuing operation to the
bottom of the constuctor.
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-01-13 17:35:11 UTC
Review of attachment 265928 [details] [review]:

OK.
Comment 7 Ray Strode [halfline] 2014-01-13 17:43:11 UTC
Attachment 265851 [details] pushed as 2d2020a - loginDialog: defer loading user list until idle
Attachment 265928 [details] pushed as 765d022 - loginDialog: move user list loading after actors are constructed