GNOME Bugzilla – Bug 659277
Indicator stuck "connecting" after resume from sleep
Last modified: 2011-11-03 12:13:04 UTC
Not sure if this is specific to suspend/resume, but that's the situation where I often reproduce it. - suspend your laptop and resume - it will reconnect to the network - connection goes fine, and I can browse the web, but the shell indicator still shows the "Connecting" icon Restarting the shell with "Alt+F2 r" restores the indicator to the normal state.
Wonder if this is a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=658150
Okay, I hit this again; Some info from ~/.xsession-errors: I see this: JS ERROR: !!! Exception was: TypeError: apObj is null JS ERROR: !!! lineNumber = '1306' JS ERROR: !!! fileName = '"/usr/share/gnome-shell/js/ui/status/network.js"' JS ERROR: !!! stack = '"([object _private_NMClient_DeviceWifi],[object _private_NMClient_AccessPoint])@/usr/share/gnome-shell/js/ui/status/network.js:1306 "' JS ERROR: !!! message = '"apObj is null"' Then later this happens: Window manager warning: Log level 16: _nm_object_get_property: Error getting 'Ssid' for /org/freedesktop/NetworkManager/AccessPoint/285: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist JS ERROR: !!! Exception was: Error: Expected type guint8 for Argument 'ssid' but got type 'object' (nil) JS ERROR: !!! lineNumber = '0' JS ERROR: !!! fileName = '"gjs_throw"' JS ERROR: !!! stack = '"("Expected type guint8 for Argument 'ssid' but got type 'object' (nil)")@gjs_throw:0 ssidToLabel(null)@/usr/share/gnome-shell/js/ui/status/network.js:95 ([object Array])@/usr/share/gnome-shell/js/ui/status/network.js:116 NMNetworkMenuItem([object Array])@/usr/share/gnome-shell/js/ui/status/network.js:102 ([object Object],1)@/usr/share/gnome-shell/js/ui/status/network.js:1502 ()@/usr/share/gnome-shell/js/ui/status/network.js:1547 ([object _private_NMClient_DeviceWifi],30,20,42)@/usr/share/gnome-shell/js/ui/status/network.js:634 "' JS ERROR: !!! message = '"Expected type guint8 for Argument 'ssid' but got type 'object' (nil)"'
Created attachment 199197 [details] [review] Network Menu: fix pulling out the first element from the More... submenu. PopupMenu.firstMenuItem returns a PopupMenuItem, not an apObj. We need to retrive the latter using the back property. Also, somehow the property from the number of elements in a menu was changed from .length to .numMenuItems, and this broke the destruction of the menu upon emptying it.
Not a fix for the original bug (the connected/connecting status should originate from a different C signal handler, and thus should not be affected by JS exceptions), but should definitely help. Also, for the "Window manager warning" part, see bug 651378 comment #27.
*** Bug 661094 has been marked as a duplicate of this bug. ***
Review of attachment 199197 [details] [review]: ::: js/ui/status/network.js @@ +1304,3 @@ + let item = this._overflowItem.menu.firstMenuItem; + if (item && item._apObj) { Not a fan of accessing another item's private property. @@ +1317,3 @@ // This can happen if the removed connection is from the overflow // menu, or if we just moved the last connection out from the menu + if (this._overflowItem.menu.numMenuItems == 0) { This looks unrelated?
(In reply to comment #6) > Review of attachment 199197 [details] [review]: > > ::: js/ui/status/network.js > @@ +1304,3 @@ > > + let item = this._overflowItem.menu.firstMenuItem; > + if (item && item._apObj) { > > Not a fan of accessing another item's private property. Not a private property, it's a property NMDeviceWifi attaches in _createNetworkItem... sometimes. I'll attach a patch for that as well :) > > @@ +1317,3 @@ > // This can happen if the removed connection is from the > overflow > // menu, or if we just moved the last connection out from the > menu > + if (this._overflowItem.menu.numMenuItems == 0) { > > This looks unrelated? Not really. I guess the menu can end up empty because of that, and therefore crash the next time, three lines up.
Created attachment 200035 [details] [review] Network Menu: fix pulling out the first element from the More... submenu. PopupMenu.firstMenuItem returns a PopupMenuItem, not an apObj. We need to retrive the latter using the back property. Also, somehow the property from the number of elements in a menu was changed from .length to .numMenuItems, and this broke the destruction of the menu upon emptying it.
Review of attachment 200035 [details] [review]: "the back property?" Otherwise, this looks fine. ::: js/ui/status/network.js @@ +1497,2 @@ apObj.item = this._createAPItem(apObj.connections[0], apObj, false); + apObj.item._apObj = apObj; Put this below the if, instead of duplicating it in both branches?
(In reply to comment #9) > Review of attachment 200035 [details] [review]: > > "the back property?" Uhm... like "back pointer"? Changed, anyway.
Created attachment 200240 [details] [review] Network Menu: fix pulling out the first element from the More... submenu. PopupMenu.firstMenuItem returns a PopupMenuItem, not an apObj. We need to retrive the latter using the _apObj property. Also, somehow the property from the number of elements in a menu was changed from .length to .numMenuItems, and this broke the destruction of the menu upon emptying it.
Review of attachment 200240 [details] [review]: Makes sense to me.
Attachment 200240 [details] pushed as 70fc135 - Network Menu: fix pulling out the first element from the More... submenu.