GNOME Bugzilla – Bug 658600
Geany crashes when reopening file chooser dialog
Last modified: 2011-09-13 20:28:35 UTC
Created attachment 196035 [details] backtrace Geany crashes when clicking "Open file", "Cancel" and then "Open file" (only when having an empty new buffer opened): Gtk:ERROR:gtkfilechooserdefault.c:8750:gtk_file_chooser_default_initial_focus: assertion failed: (widget != NULL) Back reference to the Arch Linux bug tracker where it was discovered: https://bugs.archlinux.org/task/25893 $ geany -V geany 0.20 (built on Sep 8 2011 with GTK 2.24.6, GLib 2.28.8, GIO)
Created attachment 196033 [details] backtrace
Is it possible for you to try the latest in the gtk-2-24 branch? I'm pretty sure I fixed that after 2.24.6. Thanks!
I checked out the gtk-2-24 branch, rebuilt gtk and can still reproduce it. LC_ALL=C geany -V geany 0.20 (built on Sep 12 2011 with GTK 2.24.7, GLib 2.28.8, GIO) If you fixed it, can you please point me to the relevant changes?
Created attachment 196296 [details] backtrace backtrace with latest gtk from gtk-2-24
Same crash is happening with master. What I see is that the second time the dialog is presented, when we get to gtk_file_chooser_default_initial_focus, location_mode is LOCATION_MODE_FILENAME_ENTRY, but location_entry is still NULL, causing us to run into the assertion in line 9040
OK, I can reproduce it now. I'll have a fix tomorrow.
oh, didn't see you comment - I just committed a bandaid workaround. Feel free to revert that when you have a real fix.
moving off the blocker, since a bandaid is in place
Created attachment 196433 [details] [review] bgo658600-filechooser-dont-focus-entry-in-recent-mode.diff I've pushed this to gtk-2-24, gtk-3-0 and master.