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 708286 - GtkBuilder related memory leak fixes and cleanups
GtkBuilder related memory leak fixes and cleanups
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Universal Access
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-18 12:46 UTC by Rui Matos
Modified: 2013-10-01 08:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bluetooth: Remove dead code (969 bytes, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
bluetooth: Remove unused toplevel window from .ui file (1.49 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Remove a duplicate widget instance (864 bytes, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Don't leak the calibrate dialog (1.48 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Don't leak the calibrate builder instance (879 bytes, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Remove unused toplevel window from .ui file (2.97 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Remove an unused dialog (12.55 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Don't leak the calibration assistant dialog (6.25 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
color: Don't leak the assign dialog (3.77 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
datetime: Don't leak the dialogs (2.88 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
datetime: Remove unused toplevel window from .ui file (1.67 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
display: Remove no longer used .ui file (28.86 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
info: Don't leak a dialog (1.81 KB, patch)
2013-09-18 12:46 UTC, Rui Matos
committed Details | Review
info: Remove unused toplevel window from .ui file (1.50 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
keyboard: Remove unused toplevel window from .ui file (4.91 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
keyboard: Don't leak a dialog (761 bytes, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
mouse: Remove unused variable (717 bytes, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
mouse: Remove unused toplevel windows from .ui files (5.99 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
network: Remove unused toplevel windows from .ui files (12.96 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
network: Don't leak a couple of dialogs (3.15 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
network: Don't leak a builder instance (749 bytes, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
network: Remove an unused dialog (7.16 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
notifications: Remove unused toplevel window from .ui file (1.69 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
online-accounts: Remove unused toplevel window from .ui file (1.67 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
power: Don't leak a dialog (2.27 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
power: Remove unused toplevel window from .ui file (1.85 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
printers: Don't leak a couple of dialogs (1.44 KB, patch)
2013-09-18 12:47 UTC, Rui Matos
committed Details | Review
privacy: Don't leak the dialogs (3.27 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
privacy: Remove unused toplevel window from .ui file (1.50 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
region: Remove unused toplevel window from .ui file (1.51 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
search: Remove unused toplevel window from .ui file (1.42 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
sharing: Remove unused toplevel window from .ui file (1.12 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
user-accounts: Don't leak a dialog (850 bytes, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
user-accounts: Remove no longer used .ui file (16.17 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
user-accounts: Remove unused toplevel window from .ui file (2.47 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
universal-access: Remove unused toplevel window from .ui file (1.78 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review
universal-access: Don't leak the dialogs (2.67 KB, patch)
2013-09-18 12:48 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-09-18 12:46:05 UTC
I was investigating a crash when toggling a switch on the a11y panel
for 2nd time after having opened the panel, closing and returning back
to it.

The crash happens in a GSettings changed signal handler because the
GSettings instance isn't finalized when exiting the panel since it is
bound to a widget which happens to be a child of a GtkDialog.

It turns out that toplevel windows instantiated by GtkBuilder actually
have a reference count of 2 and thus aren't destroyed along with the
GtkBuilder instance. The documentation actually says so:

"Toplevel windows returned by these functions will stay around until
the user explicitly destroys them with gtk_widget_destroy()."

Then I checked other panels and yes, most of them are leaking
GtkDialog instances and other toplevels which are never used.

This patch set tries to fix this. AFAIK only the a11y panel case
actually leads to a crash but I didn't investigate each case closely
enough to be sure.
Comment 1 Rui Matos 2013-09-18 12:46:10 UTC
Created attachment 255176 [details] [review]
bluetooth: Remove dead code
Comment 2 Rui Matos 2013-09-18 12:46:13 UTC
Created attachment 255177 [details] [review]
bluetooth: Remove unused toplevel window from .ui file
Comment 3 Rui Matos 2013-09-18 12:46:17 UTC
Created attachment 255178 [details] [review]
color: Remove a duplicate widget instance
Comment 4 Rui Matos 2013-09-18 12:46:20 UTC
Created attachment 255179 [details] [review]
color: Don't leak the calibrate dialog
Comment 5 Rui Matos 2013-09-18 12:46:24 UTC
Created attachment 255180 [details] [review]
color: Don't leak the calibrate builder instance
Comment 6 Rui Matos 2013-09-18 12:46:28 UTC
Created attachment 255181 [details] [review]
color: Remove unused toplevel window from .ui file
Comment 7 Rui Matos 2013-09-18 12:46:32 UTC
Created attachment 255182 [details] [review]
color: Remove an unused dialog
Comment 8 Rui Matos 2013-09-18 12:46:36 UTC
Created attachment 255183 [details] [review]
color: Don't leak the calibration assistant dialog
Comment 9 Rui Matos 2013-09-18 12:46:41 UTC
Created attachment 255184 [details] [review]
color: Don't leak the assign dialog
Comment 10 Rui Matos 2013-09-18 12:46:44 UTC
Created attachment 255185 [details] [review]
datetime: Don't leak the dialogs
Comment 11 Rui Matos 2013-09-18 12:46:48 UTC
Created attachment 255186 [details] [review]
datetime: Remove unused toplevel window from .ui file
Comment 12 Rui Matos 2013-09-18 12:46:53 UTC
Created attachment 255187 [details] [review]
display: Remove no longer used .ui file
Comment 13 Rui Matos 2013-09-18 12:46:57 UTC
Created attachment 255188 [details] [review]
info: Don't leak a dialog
Comment 14 Rui Matos 2013-09-18 12:47:01 UTC
Created attachment 255189 [details] [review]
info: Remove unused toplevel window from .ui file
Comment 15 Rui Matos 2013-09-18 12:47:05 UTC
Created attachment 255190 [details] [review]
keyboard: Remove unused toplevel window from .ui file
Comment 16 Rui Matos 2013-09-18 12:47:09 UTC
Created attachment 255191 [details] [review]
keyboard: Don't leak a dialog
Comment 17 Rui Matos 2013-09-18 12:47:13 UTC
Created attachment 255192 [details] [review]
mouse: Remove unused variable
Comment 18 Rui Matos 2013-09-18 12:47:18 UTC
Created attachment 255193 [details] [review]
mouse: Remove unused toplevel windows from .ui files
Comment 19 Rui Matos 2013-09-18 12:47:22 UTC
Created attachment 255194 [details] [review]
network: Remove unused toplevel windows from .ui files
Comment 20 Rui Matos 2013-09-18 12:47:26 UTC
Created attachment 255195 [details] [review]
network: Don't leak a couple of dialogs
Comment 21 Rui Matos 2013-09-18 12:47:30 UTC
Created attachment 255196 [details] [review]
network: Don't leak a builder instance
Comment 22 Rui Matos 2013-09-18 12:47:35 UTC
Created attachment 255197 [details] [review]
network: Remove an unused dialog
Comment 23 Rui Matos 2013-09-18 12:47:39 UTC
Created attachment 255198 [details] [review]
notifications: Remove unused toplevel window from .ui file
Comment 24 Rui Matos 2013-09-18 12:47:43 UTC
Created attachment 255199 [details] [review]
online-accounts: Remove unused toplevel window from .ui file
Comment 25 Rui Matos 2013-09-18 12:47:48 UTC
Created attachment 255200 [details] [review]
power: Don't leak a dialog
Comment 26 Rui Matos 2013-09-18 12:47:52 UTC
Created attachment 255201 [details] [review]
power: Remove unused toplevel window from .ui file
Comment 27 Rui Matos 2013-09-18 12:47:57 UTC
Created attachment 255202 [details] [review]
printers: Don't leak a couple of dialogs
Comment 28 Rui Matos 2013-09-18 12:48:02 UTC
Created attachment 255203 [details] [review]
privacy: Don't leak the dialogs
Comment 29 Rui Matos 2013-09-18 12:48:07 UTC
Created attachment 255204 [details] [review]
privacy: Remove unused toplevel window from .ui file
Comment 30 Rui Matos 2013-09-18 12:48:11 UTC
Created attachment 255205 [details] [review]
region: Remove unused toplevel window from .ui file
Comment 31 Rui Matos 2013-09-18 12:48:15 UTC
Created attachment 255206 [details] [review]
search: Remove unused toplevel window from .ui file
Comment 32 Rui Matos 2013-09-18 12:48:20 UTC
Created attachment 255207 [details] [review]
sharing: Remove unused toplevel window from .ui file
Comment 33 Rui Matos 2013-09-18 12:48:24 UTC
Created attachment 255208 [details] [review]
user-accounts: Don't leak a dialog
Comment 34 Rui Matos 2013-09-18 12:48:29 UTC
Created attachment 255209 [details] [review]
user-accounts: Remove no longer used .ui file
Comment 35 Rui Matos 2013-09-18 12:48:34 UTC
Created attachment 255210 [details] [review]
user-accounts: Remove unused toplevel window from .ui file
Comment 36 Rui Matos 2013-09-18 12:48:46 UTC
Created attachment 255211 [details] [review]
universal-access: Remove unused toplevel window from .ui file
Comment 37 Rui Matos 2013-09-18 12:48:51 UTC
Created attachment 255213 [details] [review]
universal-access: Don't leak the dialogs
Comment 38 Bastien Nocera 2013-09-18 15:55:03 UTC
Review of attachment 255176 [details] [review]:

++
Comment 39 Bastien Nocera 2013-09-18 15:55:27 UTC
Review of attachment 255177 [details] [review]:

++
Comment 40 Bastien Nocera 2013-09-18 15:56:53 UTC
Review of attachment 255178 [details] [review]:

++
Comment 41 Bastien Nocera 2013-09-18 15:58:13 UTC
Review of attachment 255179 [details] [review]:

++
Comment 42 Bastien Nocera 2013-09-18 15:59:29 UTC
Review of attachment 255180 [details] [review]:

++
Comment 43 Bastien Nocera 2013-09-18 16:00:16 UTC
Review of attachment 255181 [details] [review]:

++
Comment 44 Bastien Nocera 2013-09-18 16:02:28 UTC
Review of attachment 255182 [details] [review]:

++
Comment 45 Bastien Nocera 2013-09-18 16:03:11 UTC
Review of attachment 255183 [details] [review]:

++
Comment 46 Bastien Nocera 2013-09-18 16:04:00 UTC
Review of attachment 255184 [details] [review]:

++
Comment 47 Bastien Nocera 2013-09-18 16:04:29 UTC
Review of attachment 255185 [details] [review]:

++
Comment 48 Bastien Nocera 2013-09-18 16:07:06 UTC
Review of attachment 255186 [details] [review]:

++
Comment 49 Bastien Nocera 2013-09-18 16:07:42 UTC
Review of attachment 255187 [details] [review]:

++
Comment 50 Bastien Nocera 2013-09-18 16:08:07 UTC
Review of attachment 255188 [details] [review]:

++
Comment 51 Bastien Nocera 2013-09-18 16:09:50 UTC
Review of attachment 255189 [details] [review]:

++
Comment 52 Bastien Nocera 2013-09-18 16:10:27 UTC
Review of attachment 255190 [details] [review]:

++
Comment 53 Bastien Nocera 2013-09-18 16:11:26 UTC
Review of attachment 255191 [details] [review]:

++
Comment 54 Bastien Nocera 2013-09-18 16:11:44 UTC
Review of attachment 255192 [details] [review]:

++
Comment 55 Bastien Nocera 2013-09-18 16:13:23 UTC
Review of attachment 255193 [details] [review]:

++
Comment 56 Bastien Nocera 2013-09-18 16:16:22 UTC
Review of attachment 255194 [details] [review]:

++
Comment 57 Bastien Nocera 2013-09-18 16:17:25 UTC
Review of attachment 255195 [details] [review]:

++
Comment 58 Bastien Nocera 2013-09-18 16:17:54 UTC
Review of attachment 255196 [details] [review]:

++
Comment 59 Bastien Nocera 2013-09-18 16:18:28 UTC
Review of attachment 255197 [details] [review]:

++
Comment 60 Bastien Nocera 2013-09-18 16:18:57 UTC
Review of attachment 255198 [details] [review]:

++
Comment 61 Bastien Nocera 2013-09-18 16:19:33 UTC
Review of attachment 255199 [details] [review]:

++
Comment 62 Bastien Nocera 2013-09-18 16:19:58 UTC
Review of attachment 255200 [details] [review]:

++
Comment 63 Bastien Nocera 2013-09-18 16:20:18 UTC
Review of attachment 255201 [details] [review]:

++
Comment 64 Bastien Nocera 2013-09-18 16:22:05 UTC
Review of attachment 255202 [details] [review]:

++
Comment 65 Bastien Nocera 2013-09-18 16:22:51 UTC
Review of attachment 255203 [details] [review]:

++
Comment 66 Bastien Nocera 2013-09-18 16:23:11 UTC
Review of attachment 255204 [details] [review]:

++
Comment 67 Bastien Nocera 2013-09-18 16:23:53 UTC
Review of attachment 255205 [details] [review]:

++
Comment 68 Bastien Nocera 2013-09-18 16:25:22 UTC
Review of attachment 255206 [details] [review]:

++
Comment 69 Bastien Nocera 2013-09-18 16:26:37 UTC
Review of attachment 255207 [details] [review]:

++
Comment 70 Bastien Nocera 2013-09-18 16:26:56 UTC
Review of attachment 255208 [details] [review]:

++
Comment 71 Bastien Nocera 2013-09-18 16:27:49 UTC
Review of attachment 255209 [details] [review]:

++
Comment 72 Bastien Nocera 2013-09-18 16:28:20 UTC
Review of attachment 255210 [details] [review]:

++
Comment 73 Bastien Nocera 2013-09-18 16:28:42 UTC
Review of attachment 255211 [details] [review]:

++
Comment 74 Bastien Nocera 2013-09-18 16:29:15 UTC
Review of attachment 255213 [details] [review]:

++
Comment 75 Bastien Nocera 2013-10-01 08:05:23 UTC
Attachment 255176 [details] pushed as be3965a - bluetooth: Remove dead code
Attachment 255177 [details] pushed as 37b31be - bluetooth: Remove unused toplevel window from .ui file
Attachment 255178 [details] pushed as 7542385 - color: Remove a duplicate widget instance
Attachment 255179 [details] pushed as 62faba9 - color: Don't leak the calibrate dialog
Attachment 255180 [details] pushed as bd978ea - color: Don't leak the calibrate builder instance
Attachment 255181 [details] pushed as 73a7f4c - color: Remove unused toplevel window from .ui file
Attachment 255182 [details] pushed as 5e0d626 - color: Remove an unused dialog
Attachment 255183 [details] pushed as 1776558 - color: Don't leak the calibration assistant dialog
Attachment 255184 [details] pushed as 418b9f9 - color: Don't leak the assign dialog
Attachment 255185 [details] pushed as 545c886 - datetime: Don't leak the dialogs
Attachment 255186 [details] pushed as a401a91 - datetime: Remove unused toplevel window from .ui file
Attachment 255187 [details] pushed as ea4f2b1 - display: Remove no longer used .ui file
Attachment 255188 [details] pushed as 416de8a - info: Don't leak a dialog
Attachment 255189 [details] pushed as ae19832 - info: Remove unused toplevel window from .ui file
Attachment 255190 [details] pushed as 640cdb4 - keyboard: Remove unused toplevel window from .ui file
Attachment 255191 [details] pushed as f444c7b - keyboard: Don't leak a dialog
Attachment 255192 [details] pushed as 98719f3 - mouse: Remove unused variable
Attachment 255193 [details] pushed as 98ec15a - mouse: Remove unused toplevel windows from .ui files
Attachment 255194 [details] pushed as c5b70a7 - network: Remove unused toplevel windows from .ui files
Attachment 255195 [details] pushed as db62c4f - network: Don't leak a couple of dialogs
Attachment 255196 [details] pushed as 2d18798 - network: Don't leak a builder instance
Attachment 255197 [details] pushed as e0583d0 - network: Remove an unused dialog
Attachment 255198 [details] pushed as f83c661 - notifications: Remove unused toplevel window from .ui file
Attachment 255199 [details] pushed as 9288bbb - online-accounts: Remove unused toplevel window from .ui file
Attachment 255200 [details] pushed as 4494045 - power: Don't leak a dialog
Attachment 255201 [details] pushed as 7c58167 - power: Remove unused toplevel window from .ui file
Attachment 255202 [details] pushed as b17bd4e - printers: Don't leak a couple of dialogs
Attachment 255203 [details] pushed as 33202b9 - privacy: Don't leak the dialogs
Attachment 255204 [details] pushed as d9196b8 - privacy: Remove unused toplevel window from .ui file
Attachment 255205 [details] pushed as 559161b - region: Remove unused toplevel window from .ui file
Attachment 255206 [details] pushed as 96b9111 - search: Remove unused toplevel window from .ui file
Attachment 255207 [details] pushed as fcb5401 - sharing: Remove unused toplevel window from .ui file
Attachment 255208 [details] pushed as 3b485b6 - user-accounts: Don't leak a dialog
Attachment 255209 [details] pushed as d8620d3 - user-accounts: Remove no longer used .ui file
Attachment 255210 [details] pushed as 4001cbf - user-accounts: Remove unused toplevel window from .ui file
Attachment 255211 [details] pushed as 926615b - universal-access: Remove unused toplevel window from .ui file
Attachment 255213 [details] pushed as e7de1af - universal-access: Don't leak the dialogs