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 746411 - network: Fix a bunch of crashers after the panel has gone away
network: Fix a bunch of crashers after the panel has gone away
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: 2015-03-18 18:03 UTC by Bastien Nocera
Modified: 2015-03-19 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Fix the network panel being kept alive (5.67 KB, patch)
2015-03-18 18:03 UTC, Bastien Nocera
committed Details | Review
network: Remove unused GtkListStore objects (3.00 KB, patch)
2015-03-18 18:03 UTC, Bastien Nocera
committed Details | Review
network: Fix GtkListStore leak in IPv{4,6} dialogues (1.57 KB, patch)
2015-03-18 18:03 UTC, Bastien Nocera
committed Details | Review
network: Add sanity checks NetDevice and NetObject (1.52 KB, patch)
2015-03-18 18:04 UTC, Bastien Nocera
committed Details | Review
network: Fix reference leak of NetVpn (815 bytes, patch)
2015-03-18 18:04 UTC, Bastien Nocera
committed Details | Review
network: Fix warning on panel exit (1.26 KB, patch)
2015-03-18 18:04 UTC, Bastien Nocera
committed Details | Review
network: Remove use of temporary variable (1.62 KB, patch)
2015-03-18 18:04 UTC, Bastien Nocera
committed Details | Review
network: Fix reference leak of NetProxy (1.11 KB, patch)
2015-03-18 18:04 UTC, Bastien Nocera
committed Details | Review
network: Fix reference leak of NetVirtualDevices (875 bytes, patch)
2015-03-18 18:04 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-03-18 18:03:31 UTC
.
Comment 1 Bastien Nocera 2015-03-18 18:03:45 UTC
Created attachment 299738 [details] [review]
network: Fix the network panel being kept alive

NetObjects and CcNetworkPanel aren't widgets, and hold references to
each other. Simplify things by having NetObject hold a pointer to
CcNetworkPanel (and the singletons NMRemoteSettings and NMClient)
instead.
Comment 2 Bastien Nocera 2015-03-18 18:03:51 UTC
Created attachment 299739 [details] [review]
network: Remove unused GtkListStore objects
Comment 3 Bastien Nocera 2015-03-18 18:03:56 UTC
Created attachment 299740 [details] [review]
network: Fix GtkListStore leak in IPv{4,6} dialogues
Comment 4 Bastien Nocera 2015-03-18 18:04:01 UTC
Created attachment 299741 [details] [review]
network: Add sanity checks NetDevice and NetObject
Comment 5 Bastien Nocera 2015-03-18 18:04:06 UTC
Created attachment 299742 [details] [review]
network: Fix reference leak of NetVpn

The only reference is owned by the devices GtkListStore.
Comment 6 Bastien Nocera 2015-03-18 18:04:11 UTC
Created attachment 299743 [details] [review]
network: Fix warning on panel exit

Now that the VPN object is getting finalized, make sure not to warn if
the NMClient is already gone.
Comment 7 Bastien Nocera 2015-03-18 18:04:16 UTC
Created attachment 299744 [details] [review]
network: Remove use of temporary variable

No need to copy a static string before using it.
Comment 8 Bastien Nocera 2015-03-18 18:04:21 UTC
Created attachment 299745 [details] [review]
network: Fix reference leak of NetProxy

Every time we got the list of devices from the devices GtkListStore, we
were leaking the only element that wasn't a NetDevice, the proxy page.
Make sure to unref' it by hand if we're not going to add it to the list
(the elements of which will be unref'ed properly).
Comment 9 Bastien Nocera 2015-03-18 18:04:25 UTC
Created attachment 299746 [details] [review]
network: Fix reference leak of NetVirtualDevices

Once we've added them to the devices GtkListStore, it owns them, don't
leave a reference lingering.
Comment 11 Matthias Clasen 2015-03-18 19:03:35 UTC
Review of attachment 299738 [details] [review]:

Makes sense. Might want to mention the weak reference in the commit message.
Comment 12 Matthias Clasen 2015-03-18 19:06:37 UTC
Review of attachment 299739 [details] [review]:

Are you sure these are really unused ?!


I see a reference to liststore_proxy_method in the same ui file, in the properties of combobox_proxy_mode
Comment 13 Matthias Clasen 2015-03-18 19:07:39 UTC
Review of attachment 299740 [details] [review]:

Looks correct
Comment 14 Matthias Clasen 2015-03-18 19:08:13 UTC
Review of attachment 299741 [details] [review]:

Makes sense
Comment 15 Matthias Clasen 2015-03-18 19:08:20 UTC
Review of attachment 299741 [details] [review]:

Makes sense
Comment 16 Matthias Clasen 2015-03-18 19:10:08 UTC
Review of attachment 299742 [details] [review]:

Looks correct. But the net_virt object seems to have the same issue ?!
Comment 17 Matthias Clasen 2015-03-18 19:10:38 UTC
Review of attachment 299743 [details] [review]:

sure
Comment 18 Matthias Clasen 2015-03-18 19:11:09 UTC
Review of attachment 299744 [details] [review]:

looks fine
Comment 19 Matthias Clasen 2015-03-18 19:11:57 UTC
Review of attachment 299745 [details] [review]:

ok
Comment 20 Matthias Clasen 2015-03-18 19:12:30 UTC
Review of attachment 299746 [details] [review]:

ah right, thats what I complained about a few patches up
Comment 21 Matthias Clasen 2015-03-18 19:13:33 UTC
these look like excellent candidates for backporting to 3.14 too, for distros shipping stable releases
Comment 22 Bastien Nocera 2015-03-18 20:11:10 UTC
Review of attachment 299739 [details] [review]:

Certain. There's a liststore_proxy_method in network.ui, which I'm removing, and there's one in network-proxy.ui, which is where combobox_proxy_mode also is.

Resetting the status.
Comment 23 Bastien Nocera 2015-03-19 15:33:37 UTC
Attachment 299738 [details] pushed as 60f6ba1 - network: Fix the network panel being kept alive
Attachment 299739 [details] pushed as 0e428f2 - network: Remove unused GtkListStore objects
Attachment 299740 [details] pushed as 219a94e - network: Fix GtkListStore leak in IPv{4,6} dialogues
Attachment 299741 [details] pushed as 234ed23 - network: Add sanity checks NetDevice and NetObject
Attachment 299742 [details] pushed as eb14e55 - network: Fix reference leak of NetVpn
Attachment 299743 [details] pushed as ba6da76 - network: Fix warning on panel exit
Attachment 299744 [details] pushed as f6f4e7b - network: Remove use of temporary variable
Attachment 299745 [details] pushed as 2cf597e - network: Fix reference leak of NetProxy
Attachment 299746 [details] pushed as a678193 - network: Fix reference leak of NetVirtualDevices