GNOME Bugzilla – Bug 725164
[crash] update_current_folder_get_info_cb at gtkfilechooserwidget.c
Last modified: 2015-01-24 22:32:37 UTC
This is with current trunk, but happens in 3.10.7 as well. Program received signal SIGSEGV, Segmentation fault. update_current_folder_get_info_cb (cancellable=0x2cf6340, info=0x0, error=0x1700f60, user_data=0x1bf31f0) at gtkfilechooserwidget.c:4420 4420 if (cancellable != priv->update_current_folder_cancellable)
+ Trace 233239
Thread 1 (Thread 0x7ffff7fbd700 (LWP 23922))
Not enough detail here, I'm afraid. What are you you doing when this happens ?
Some more info: * It's happening during my unit tests only * There is no main loop running and it's basically creating the widget, settings some things and calling destroy(). * Adding a gtk_main_iteration() loop before the destroy() fixes it. * Sadly the test causing the segv doesn't segv if run alone, only running all tests triggers it somehow.
Downstream bug report about the same with gtk3-3.14.4-1.fc21.x86_64: https://bugzilla.redhat.com/show_bug.cgi?id=1160111
Created attachment 294918 [details] [review] FileChooserWidget: remove dead code [PATCH 1/2] FileChooserWidget: remove dead code
Created attachment 294919 [details] [review] GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current folder. GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current folder. Keep a reference to the widget while the async operation is ongoing.
Review of attachment 294918 [details] [review]: Would be good if the commit message said something to the extent of: These fields are never set, so we don't need the code to clean them up.
Review of attachment 294919 [details] [review]: The actual change (taking a ref) looks good to me. ::: gtk/gtkfilechooserwidget.c @@ +1487,3 @@ + GtkFileChooserWidget *impl; /* owned */ + gchar **uris; /* owned full */ + GFile *file; /* owned */ We don't really use such annotations in gtk, so please leave them out.
Created attachment 295022 [details] [review] GtkFileChooserWidget: remove unused fields and cleanup code.
Created attachment 295023 [details] [review] GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current folder.
Review of attachment 295022 [details] [review]: sure, thanks
Review of attachment 295023 [details] [review]: ok
Attachment 295022 [details] pushed as c235747 - GtkFileChooserWidget: remove unused fields and cleanup code. Attachment 295023 [details] pushed as 8fc9201 - GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current folder.