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 658600 - Geany crashes when reopening file chooser dialog
Geany crashes when reopening file chooser dialog
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: Federico Mena Quintero
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2011-09-08 19:28 UTC by Jakob Matthes
Modified: 2011-09-13 20:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (7.03 KB, text/plain)
2011-09-08 19:31 UTC, Jakob Matthes
  Details
backtrace (7.03 KB, text/x-log)
2011-09-08 19:28 UTC, Jakob Matthes
  Details
backtrace (11.46 KB, text/plain)
2011-09-12 18:38 UTC, Jakob Matthes
  Details
bgo658600-filechooser-dont-focus-entry-in-recent-mode.diff (1.13 KB, patch)
2011-09-13 20:28 UTC, Federico Mena Quintero
committed Details | Review

Description Jakob Matthes 2011-09-08 19:28:56 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)
Comment 1 Jakob Matthes 2011-09-08 19:31:56 UTC
Created attachment 196033 [details]
backtrace
Comment 2 Federico Mena Quintero 2011-09-12 17:27:03 UTC
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!
Comment 3 Jakob Matthes 2011-09-12 18:36:42 UTC
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?
Comment 4 Jakob Matthes 2011-09-12 18:38:12 UTC
Created attachment 196296 [details]
backtrace

backtrace with latest gtk from gtk-2-24
Comment 5 Matthias Clasen 2011-09-12 23:19:03 UTC
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
Comment 6 Federico Mena Quintero 2011-09-12 23:32:42 UTC
OK, I can reproduce it now.  I'll have a fix tomorrow.
Comment 7 Matthias Clasen 2011-09-13 11:06:29 UTC
oh, didn't see you comment - I just committed a bandaid workaround. 
Feel free to revert that when you have a real fix.
Comment 8 Matthias Clasen 2011-09-13 15:51:42 UTC
moving off the blocker, since a bandaid is in place
Comment 9 Federico Mena Quintero 2011-09-13 20:28:23 UTC
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.