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 397754 - Gtkfilechooser crash
Gtkfilechooser crash
Status: RESOLVED DUPLICATE of bug 353127
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.10.x
Other Linux
: High critical
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 384694 387074 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-01-17 20:30 UTC by Priit Laes (IRC: plaes)
Modified: 2007-02-15 20:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
gtkfilechooser-crash.patch (648 bytes, patch)
2007-01-17 20:58 UTC, Priit Laes (IRC: plaes)
none Details | Review

Description Priit Laes (IRC: plaes) 2007-01-17 20:30:23 UTC
Apparently a crash can occur when changing directories too rapidly.

     eax:00000001 ebx:B7E84D8C  ecx:00000000  edx:08208150     eflags:00010202
     esi:081AD1B0 edi:00000000  esp:BFB66DBC  ebp:BFB66E08     eip:B78B1458
     cs:0073  ds:007B  es:007B  fs:0000  gs:0033  ss:007B    o d I t s z a p c 
[007B:BFB66DBC]---------------------------------------------------------[stack]
BFB66DEC : 24 B1 05 08  C8 20 1F 08 - 00 D6 1D 08  00 00 00 00 $.... ..........
BFB66DDC : 52 B0 9F B7  04 D6 1D 08 - 03 00 00 00  02 00 00 00 R...............
BFB66DCC : 40 D1 96 B7  3C BA A1 B7 - C8 20 1F 08  08 6E B6 BF @...<.... ...n..
BFB66DBC : 39 B1 C8 B7  00 00 00 00 - 50 81 20 08  40 D1 96 B7 9.......P. .@...
[007B:081AD1B0]---------------------------------------------------------[ data]
081AD1B0 : 88 40 1F 08  50 1E 20 08 - 98 D1 1A 08  00 00 00 00 .@..P. .........
081AD1C0 : 90 A6 1F 08  00 00 00 00 - B8 D1 1A 08  00 00 00 00 ................
[0073:B78B1458]---------------------------------------------------------[ code]
0xb78b1458 <strcmp+8>:  mov    (%ecx),%al
0xb78b145a <strcmp+10>: cmp    (%edx),%al
0xb78b145c <strcmp+12>: jne    0xb78b1467 <strcmp+23>
0xb78b145e <strcmp+14>: inc    %ecx
0xb78b145f <strcmp+15>: inc    %edx
0xb78b1460 <strcmp+16>: test   %al,%al
------------------------------------------------------------------------------
0xb78b1458 in strcmp () from /lib/libc.so.6
gdb> bt
  • #0 strcmp
    from /lib/libc.so.6
  • #1 _gtk_file_system_model_path_do
    at gtkfilesystemmodel.c line 1169
  • #2 show_and_select_paths_finished_loading
    at gtkfilechooserdefault.c line 5876
  • #3 get_folder_cached_callback
    at gtkfilesystemgnomevfs.c line 1180
  • #4 execute_vfs_callbacks
    at gtkfilesystemgnomevfs.c line 3569
  • #5 execute_vfs_callbacks_idle
    at gtkfilesystemgnomevfs.c line 3588
  • #6 g_idle_dispatch
    at gmain.c line 3928
  • #7 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #8 g_main_context_iterate
    at gmain.c line 2677
  • #9 IA__g_main_loop_run
    at gmain.c line 2881
  • #10 IA__gtk_dialog_run
    at gtkdialog.c line 996
  • #11 prepare_screenshot
    at gnome-panel-screenshot.c line 249
  • #12 main
    at gnome-panel-screenshot.c line 491

Comment 1 Priit Laes (IRC: plaes) 2007-01-17 20:57:16 UTC
Seems that sometimes parent_path will be NULL...

gdb> up
  • #1 _gtk_file_system_model_path_do
    at gtkfilesystemmodel.c line 1169


Proposed patch would be:
Index: gtkfilesystemmodel.c
===================================================================
--- gtkfilesystemmodel.c        (revision 17181)
+++ gtkfilesystemmodel.c        (working copy)
@@ -1166,7 +1166,7 @@ _gtk_file_system_model_path_do (GtkFileS
     return;
 
   paths = g_slist_prepend (paths, gtk_file_path_copy (path));
-  while (gtk_file_path_compare (parent_path, model->root_path) != 0)
+  while (parent_path != NULL && gtk_file_path_compare (parent_path, model->root_path) != 0)
     {
       paths = g_slist_prepend (paths, parent_path);
       if (!gtk_file_system_get_parent (model->file_system, parent_path, &parent_path, NULL))
Comment 2 Priit Laes (IRC: plaes) 2007-01-17 20:58:57 UTC
Created attachment 80543 [details] [review]
gtkfilechooser-crash.patch

Ok to commit?
Comment 3 Priit Laes (IRC: plaes) 2007-01-17 21:05:32 UTC
How to recreate: 
1. Open file chooser
2. Select some remote share
3. Click rapidly on the path buttons until the crash occurs. Seems to occur more often when loading a directory takes a long time.
Comment 4 Teppo Turtiainen 2007-01-26 06:59:53 UTC
*** Bug 384694 has been marked as a duplicate of this bug. ***
Comment 5 Teppo Turtiainen 2007-01-26 07:00:28 UTC
*** Bug 387074 has been marked as a duplicate of this bug. ***
Comment 6 Teppo Turtiainen 2007-01-26 07:03:12 UTC
Confirming because of the duplicates.
Comment 7 Michael Chudobiak 2007-02-15 20:16:20 UTC
This is probably a duplicate of bug 353127. Priit, please see the discussion there.

- Mike
Comment 8 Priit Laes (IRC: plaes) 2007-02-15 20:41:48 UTC
Yeah, dupe :)
My crashing was 2.10.7

*** This bug has been marked as a duplicate of 353127 ***