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 646708 - network: fix two warnings when removing a network device
network: fix two warnings when removing a network device
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: GnomeShell301
 
 
Reported: 2011-04-04 12:39 UTC by Dan Winship
Modified: 2011-04-11 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: fix two warnings when removing a network device (2.40 KB, patch)
2011-04-04 12:39 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2011-04-04 12:39:19 UTC
NMApplet connects to each NMDevice's state-changed signal and stores
the signal handler id on the NMDevice itself. However, it was using
the same name as NMDevice itself was using to store the handler ID for
the underlying GObject's state-changed signal, thus overwriting it,
and resulting in *neither* signal handler getting removed if the
device went away. (This probably isn't a problem, since the device is
going away, but it causes a warning.)

Also, at least for WWAN devices, the device state changes to UNMANAGED
immediately before disappearing, but getStatusLabel() wasn't handling
that case and printed a warning instead. Fix that.
Comment 1 Dan Winship 2011-04-04 12:39:21 UTC
Created attachment 185104 [details] [review]
network: fix two warnings when removing a network device
Comment 2 Giovanni Campagna 2011-04-04 12:46:44 UTC
Review of attachment 185104 [details] [review]:

A better fix would be to wrap the NMDevice into a small object, so we're sure
we don't conflict (like PopupMenuManager does, for example), but it would be
more invasive, so ok this way.
The second part is correct.

(This is indeed a problem, as the GObject roots the JS function that handles
the signal, which references the JS object, which references the GObject,
creating an uncollectable cycle)
Comment 3 Dan Winship 2011-04-11 14:45:08 UTC
Attachment 185104 [details] pushed as 5b1a76a - network: fix two warnings when removing a network device