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 646460 - Weirdness in gtkfilechooserbutton.c: set_info_get_info_cb
Weirdness in gtkfilechooserbutton.c: set_info_get_info_cb
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2011-04-01 17:26 UTC by Morten Welinder
Modified: 2011-04-01 22:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[filechooser] Unref cancellables we got from the model, not the ones that come into the callback (2.99 KB, patch)
2011-04-01 22:20 UTC, Federico Mena Quintero
none Details | Review

Description Morten Welinder 2011-04-01 17:26:42 UTC
In the "out" path of this function, we have

   g_object_unref (cancellable);

I think this is wrong because the object that is reffed (by gtk_tree_model_get)
is model_cancellable.  If they are different, the ship sinks, I believe.
Comment 1 Morten Welinder 2011-04-01 17:29:49 UTC
Ditto in model_add_special_get_info_cb.
Comment 2 Federico Mena Quintero 2011-04-01 22:20:12 UTC
Created attachment 184913 [details] [review]
[filechooser] Unref cancellables we got from the model, not the ones that come into the callback

The model_cancellables have an extra ref when we get them from gtk_tree_model_get().
So, we need to unref them always.  On the other hand, the cancellables that get
passed as arguments to the callbacks in question are memory-managed by
GtkFileSystemModel.

Reported by Morten Welinder <mortenw@gnome.org>
Comment 3 Federico Mena Quintero 2011-04-01 22:44:15 UTC
Pushed to master.