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 680349 - Missed unparenting of tab label
Missed unparenting of tab label
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
3.5.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 670646 680157 680922 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-07-21 01:22 UTC by William Jon McCann
Modified: 2012-08-01 17:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix refcounting of slot (909 bytes, patch)
2012-07-21 01:22 UTC, William Jon McCann
rejected Details | Review

Description William Jon McCann 2012-07-21 01:22:17 UTC
If you start nautilus and quickly exit you get a bunch of critical
warnings. This seems to be because we failed to dispose of the slot
and a timeout was running and using a disposed action_group.
Comment 1 William Jon McCann 2012-07-21 01:22:19 UTC
Created attachment 219361 [details] [review]
Fix refcounting of slot

We weren't disposing the slot because we leaked a ref.
Comment 2 William Jon McCann 2012-07-21 05:31:14 UTC
*** Bug 680157 has been marked as a duplicate of this bug. ***
Comment 3 William Jon McCann 2012-07-21 05:32:59 UTC
*** Bug 670646 has been marked as a duplicate of this bug. ***
Comment 4 Cosimo Cecchi 2012-07-21 14:51:00 UTC
Review of attachment 219361 [details] [review]:

::: src/nautilus-window.c
@@ +371,3 @@
 				   gtk_notebook_get_current_page (GTK_NOTEBOOK (window->details->notebook)) + 1,
 				   FALSE);
+	g_object_unref (slot); /* owned by notebook */

Hmm, it doesn't look to me that GtkNotebook increases the reference count though - I think gtk_notebook_insert will end up in a g_object_ref_sink(); if so, we are probably leaking the reference somewhere after construction...how do you know that the notebook now owns the reference?
Comment 5 William Jon McCann 2012-07-21 15:17:34 UTC
In nautilus_window_open_slot I checked the ref count of the slot after creation and it was 1 as expected. After inserting it into the notebook it was 2.

The other reason I thought this was that close_slot() says:
	/* this will call gtk_widget_destroy on the slot */
	gtk_notebook_remove_page (notebook, page_num);


A separate but related bug is that we don't keep a ref to the action_group. If we don't keep a ref I suppose we need to do a weak pointer notify thing to clear the pointer when it is disposed by the ui-manager.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-07-29 16:50:30 UTC
Review of attachment 219361 [details] [review]:

This is indeed wrong. The thing that takes the refcount from 1 to 2 is the drag info in nautilus_drag_slot_proxy_init.
Comment 7 Cosimo Cecchi 2012-07-31 18:28:55 UTC
-> gtk+

This was indeed a regression in GTK. It's now fixed in http://git.gnome.org/browse/gtk+/commit/?id=c1218f964a8c541f8e82d42463be02a25eb36be9
Comment 8 Jasper St. Pierre (not reading bugmail) 2012-07-31 18:31:31 UTC
Ah, I was wondering why the notebook label widget wasn't being destroyed. I thought it was a Nautilus issue.
Comment 9 Cosimo Cecchi 2012-08-01 17:04:26 UTC
*** Bug 680922 has been marked as a duplicate of this bug. ***