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 541645 - gtkfilechooserdefault segfaults when bookmark does not contain ://
gtkfilechooserdefault segfaults when bookmark does not contain ://
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 551243 570719 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-05 10:58 UTC by Jelte van der Hoek
Modified: 2009-02-24 06:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Jelte van der Hoek 2008-07-05 10:58:56 UTC
Steps to reproduce:
1. edit .gtk-bookmarks to contain a normal path without the :// .  I already had a bookmark file like that, it only started crashing apps after upgrade to ubunty hard heron.
2. open filechooser, for example, start evolution, compose new email, press "attach"



Stack trace:
(gdb) backtrace
  • #0 strchr
    from /lib/tls/i686/cmov/libc.so.6
  • #1 _gtk_file_chooser_label_for_uri
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooserdefault.c line 1695
  • #2 shortcuts_insert_path
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooserdefault.c line 1813
  • #3 shortcuts_add_bookmarks
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooserdefault.c line 2014
  • #4 gtk_file_chooser_default_set_property
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooserdefault.c line 5358
  • #5 g_object_set_property
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_file_chooser_widget_set_property
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooserwidget.c line 134
  • #7 g_object_set_property
    from /usr/lib/libgobject-2.0.so.0
  • #8 gtk_file_chooser_dialog_set_property
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooserdialog.c line 322
  • #9 g_object_set_valist
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_object_set
    from /usr/lib/libgobject-2.0.so.0
  • #11 IA__gtk_file_chooser_set_local_only
    at /build/buildd/gtk+2.0-2.12.9/gtk/gtkfilechooser.c line 360
  • #12 ??
    from /usr/lib/evolution/2.22/components/libevolution-mail.so
  • #13 e_msg_composer_select_file_attachments
    from /usr/lib/evolution/2.22/components/libevolution-mail.so


Other information:
Slightly nicer handling of the result of strstr() in _gtk_file_chooser_label_for_uri would help. 

Obviously bookmarks are required to have proper URI, but if you had a file that contained a normal path a more graceful behaviour would be appreciated.
Comment 1 Matthias Clasen 2008-07-06 05:34:14 UTC
2008-07-06  Matthias Clasen  <mclasen@redhat.com>

        Bug 541645 – gtkfilechooserdefault segfaults when bookmark does not
        contain ://

        * gtk/gtkfilechooserdefault.c (_gtk_file_chooser_label_for_file):
        Be more robust. Reported by  Jelte van der Hoek
Comment 2 Paolo Benvenuto 2008-10-07 11:16:57 UTC
$ dpkg -l|grep libgtk2.0
ii  libgtk2.0-0                      2.12.9-3ubuntu5
ii  libgtk2.0-bin                    2.12.9-3ubuntu5
ii  libgtk2.0-cil                    2.12.0-2ubuntu3
ii  libgtk2.0-common                 2.12.9-3ubuntu5

in this version the edit bookmarks dialog permits the user to add a new bookmark without checking that the position is standard url formatted.

I think this bug should be reopened until that is fixed
Comment 3 Cosimo Cecchi 2008-11-17 10:02:09 UTC
*** Bug 551243 has been marked as a duplicate of this bug. ***
Comment 4 Kandepu Prasad 2009-02-24 06:38:04 UTC
*** Bug 570719 has been marked as a duplicate of this bug. ***