GNOME Bugzilla – Bug 680349
Missed unparenting of tab label
Last modified: 2012-08-01 17:04:26 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.
Created attachment 219361 [details] [review] Fix refcounting of slot We weren't disposing the slot because we leaked a ref.
*** Bug 680157 has been marked as a duplicate of this bug. ***
*** Bug 670646 has been marked as a duplicate of this bug. ***
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?
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.
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.
-> gtk+ This was indeed a regression in GTK. It's now fixed in http://git.gnome.org/browse/gtk+/commit/?id=c1218f964a8c541f8e82d42463be02a25eb36be9
Ah, I was wondering why the notebook label widget wasn't being destroyed. I thought it was a Nautilus issue.
*** Bug 680922 has been marked as a duplicate of this bug. ***