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 673043 - gnome-shell 3.3.92 crashes when networkmanager daemon is restarted
gnome-shell 3.3.92 crashes when networkmanager daemon is restarted
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.3.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-29 08:11 UTC by Ionut Biru
Modified: 2012-05-18 14:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkMenu: fix crash when NetworkManger restarts (1.25 KB, patch)
2012-03-29 17:08 UTC, Giovanni Campagna
committed Details | Review

Description Ionut Biru 2012-03-29 08:11:45 UTC
JS ERROR: !!!   Exception was: TypeError: devices is null
    JS ERROR: !!!     lineNumber = '1848'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/status/network.js"'
    JS ERROR: !!!     stack = '"()@/usr/share/gnome-shell/js/ui/status/network.js:1848
wrapper()@/usr/share/gjs-1.0/lang.js:204
()@/usr/share/gnome-shell/js/ui/status/network.js:2003
wrapper()@/usr/share/gjs-1.0/lang.js:204
([object _private_NMClient_Client],[object _private_GObject_ParamSpec])@/usr/share/gnome-shell/js/ui/status/network.js:1999
wrapper([object _private_NMClient_Client],[object _private_GObject_ParamSpec])@/usr/share/gjs-1.0/lang.js:204
"'
    JS ERROR: !!!     message = '"devices is null"'
    JS ERROR: !!!   Exception was: TypeError: devices is null
    JS ERROR: !!!     lineNumber = '1848'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/status/network.js"'
    JS ERROR: !!!     stack = '"()@/usr/share/gnome-shell/js/ui/status/network.js:1848
wrapper()@/usr/share/gjs-1.0/lang.js:204
([object _private_NMClient_Client],[object _private_GObject_ParamSpec])@/usr/share/gnome-shell/js/ui/status/network.js:2003
wrapper([object _private_NMClient_Client],[object _private_GObject_ParamSpec])@/usr/share/gjs-1.0/lang.js:204
"'
    JS ERROR: !!!     message = '"devices is null"'
** Message: applet now removed from the notification area
Comment 1 André Klapper 2012-03-29 09:47:40 UTC
Does this still happen in 3.4?
Comment 2 Ionut Biru 2012-03-29 09:49:13 UTC
between 3.3.92 and 3.4.0 there aren't any modifications related to network.

i forgot to add that i'm using networkmanager 0.9.4.0
Comment 3 Giovanni Campagna 2012-03-29 17:08:19 UTC
Created attachment 210882 [details] [review]
NetworkMenu: fix crash when NetworkManger restarts

nm_active_connection_get_devices() has a (questionable) special case
for the no devices case (which happens if the DBus object is
destroyed because NM went down): it returns null instead of an empty
array. Handle that instead of crashing.

This is a candidate for 3.4.1, I think.
Comment 4 drago01 2012-04-04 11:05:58 UTC
Review of attachment 210882 [details] [review]:

Looks good.
Comment 5 Giovanni Campagna 2012-04-09 18:37:07 UTC
Attachment 210882 [details] pushed as b6aab53 - NetworkMenu: fix crash when NetworkManger restarts
Comment 6 Dan Williams 2012-05-18 14:43:25 UTC
It returns NULL on empty arrays because before GOI was even around, these functions got used from C.  And in C it's less code to just check for NULL and then not have to free an empty array.  A lot of the other code does this too, but at least it's consistently applied throughout the library wherever a GPtrArray is returned:

nm_client_get_devices()
nm_client_get_active_connections()
nm_device_wifi_get_access_points()
nm_device_wimax_get_nsps()
nm_ip4_config_get_domains()
nm_ip6_config_get_domains()
nm_active_connection_get_devices()

But a quick audit of the code shows that every location that calls these now uses || []; so we should be fine now.