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 708468 - Crash when NM connection is removed after visiting the network panel
Crash when NM connection is removed after visiting the network panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-20 15:39 UTC by Rui Matos
Modified: 2013-10-01 08:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Correctly unref NetDevice instances when needed (1.27 KB, patch)
2013-09-20 15:39 UTC, Rui Matos
reviewed Details | Review
network/net-device-ethernet: Disconnect from NMConnection signals (1.53 KB, patch)
2013-09-20 15:39 UTC, Rui Matos
committed Details | Review
network: Correctly unref NetDevice instances when needed (1.46 KB, patch)
2013-09-21 19:06 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-09-20 15:39:12 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1010054 for a bug
report including a crash backtrace.
Comment 1 Rui Matos 2013-09-20 15:39:14 UTC
Created attachment 255415 [details] [review]
network: Correctly unref NetDevice instances when needed

In both places we are not taking the GtkListStore own reference into
account.
Comment 2 Rui Matos 2013-09-20 15:39:19 UTC
Created attachment 255416 [details] [review]
network/net-device-ethernet: Disconnect from NMConnection signals

Otherwise we'll crash in our handler if the signal fires after we're
finalized i.e. user leaves the network panel.
Comment 3 Matthias Clasen 2013-09-20 17:19:22 UTC
Review of attachment 255415 [details] [review]:

Looks right. But to me it looks like there is at least one more caller of get_selected_object() who does not take the returned ref into account: remove_connection
Comment 4 Matthias Clasen 2013-09-20 17:20:21 UTC
Review of attachment 255416 [details] [review]:

good catch
Comment 5 Matthias Clasen 2013-09-20 17:20:48 UTC
Review of attachment 255416 [details] [review]:

good catch
Comment 6 Rui Matos 2013-09-21 19:06:01 UTC
Created attachment 255497 [details] [review]
network: Correctly unref NetDevice instances when needed

We have to take the GtkListStore own reference into account.
--

(In reply to comment #3)
> Looks right. But to me it looks like there is at least one more
caller of
> get_selected_object() who does not take the returned ref into
account:
> remove_connection

Oops, fixed on this one.
Comment 7 Bastien Nocera 2013-10-01 08:02:05 UTC
Attachment 255416 [details] pushed as d8bfc9e - network/net-device-ethernet: Disconnect from NMConnection signals
Attachment 255497 [details] pushed as fecc2ec - network: Correctly unref NetDevice instances when needed