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 653038 - Filesystem activity -> crash in gtkfilesystemmodel.c
Filesystem activity -> crash in gtkfilesystemmodel.c
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.4.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2011-06-20 18:50 UTC by Joachim
Modified: 2014-12-22 16:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (1.79 KB, text/plain)
2011-06-20 18:50 UTC, Joachim
Details
backtrace with gtk+ 3.6.3 (5.49 KB, text/plain)
2013-01-07 22:48 UTC, Joachim
Details

Description Joachim 2011-06-20 18:50:53 UTC
Created attachment 190305 [details]
backtrace

+++ This bug was initially created as a clone of Bug #639189 +++

Geany crashes due to SIGABRT:
Gtk:ERROR:/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:746:gtk_file_system_model_sort: assertion failed: (r == n_visible_rows)

While a File-Chooser is open, I edit a file with vim and quit with :wq. In
that folder with one particular file the application crashes reproducibly. See
the attached backtrace with Gtk 2.24 from debian-testing.
I compiled and tried some old versions of gtk (mentioned scenario): 2.18 does
not crash (good), 2.20 and 2.24 crash (bad).

This is the same as bug 639189; I could not reopen the latter one so I cloned it.

The bug is present in several gtk-Applications; I first came across it in Geany, since there the FileSystem-Chooser was not destroyed but only hided.
The Geany developers now avoid this crash by destroying the filesystem-chooser
while it is not needed but the GTK-Bug is still reproducible if the FileChooser
is shown.

see the geany bug report:
http://sourceforge.net/tracker/?func=detail&aid=3311258&group_id=153444&atid=787791

I guess the problem could be, that vim uses a .filename.txt.swq swap file that is deleted on exit (:q). At the same moment that filename.txt is modified.
Probably this two events (deletion and modify) are processed in a wrong order
in gtk_filesystemmodel.c

What could I try or what additional information do you need?
Comment 1 Milan Crha 2011-10-26 07:16:59 UTC
There is a similar downstream bug report from Fedora 16/gtk3-3.2.1:
https://bugzilla.redhat.com/show_bug.cgi?id=748739

Thread 1 (Thread 0x7f3c3fd77980 (LWP 1990))

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 __GI_abort
    at abort.c line 91
  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at gtestutils.c line 1436
  • #4 gtk_file_system_model_sort
    at gtkfilesystemmodel.c line 745
  • #5 gtk_file_system_model_sort
    at gtkfilesystemmodel.c line 700
  • #6 _gtk_file_system_model_update_file
    at gtkfilesystemmodel.c line 1785
  • #7 gtk_file_system_model_query_done
    at gtkfilesystemmodel.c line 1153
  • #8 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #9 complete_in_idle_cb_for_thread
    at gsimpleasyncresult.c line 817
  • #10 g_main_dispatch
    at gmain.c line 2425
  • #11 g_main_context_dispatch
    at gmain.c line 2995
  • #12 g_main_context_iterate
    at gmain.c line 3073
  • #13 g_main_loop_run
    at gmain.c line 3281
  • #14 gtk_main
    at gtkmain.c line 1362
  • #15 main
    at main.c line 696

Comment 2 Michael Meeks 2011-12-14 11:07:41 UTC
this is prolly related to #666158 too.
Comment 3 Milan Crha 2012-07-18 20:30:13 UTC
I've a simple reproducer for this:
a) run gtk3-demo -> Pickers
b) In File: select file from any folder, only make sure you'll avoid
   Recently used and you'll go to the folder itself
c) when back in Pickers with the file selected open terminal and rename one
   file in the folder from b), it doesn't matter which, I chose a different
   file than the one I selected in the dialog.
d) wait a second
f) Poof, gtk3-demo is down with assert:

Gtk:ERROR:gtkfilesystemmodel.c:751:gtk_file_system_model_sort: assertion failed: (r == n_visible_rows)

Thread 1 (Thread 0x7ffc3b836980 (LWP 12269))

  • #0 waitpid
    from /lib64/libpthread.so.0
  • #1 g_spawn_sync
    from /lib64/libglib-2.0.so.0
  • #2 g_spawn_command_line_sync
    from /lib64/libglib-2.0.so.0
  • #3 run_bug_buddy
    at gnome-segvhanlder.c line 240
  • #4 bugbuddy_segv_handle
    at gnome-segvhanlder.c line 191
  • #5 <signal handler called>
  • #6 raise
    from /lib64/libc.so.6
  • #7 abort
    from /lib64/libc.so.6
  • #8 g_assertion_message
    from /lib64/libglib-2.0.so.0
  • #9 g_assertion_message_expr
    from /lib64/libglib-2.0.so.0
  • #10 gtk_file_system_model_sort
    at gtkfilesystemmodel.c line 751
  • #11 gtk_file_system_model_sort
    at gtkfilesystemmodel.c line 706
  • #12 _gtk_file_system_model_update_file
    at gtkfilesystemmodel.c line 1816
  • #13 gtk_file_system_model_query_done
    at gtkfilesystemmodel.c line 1160
  • #14 g_simple_async_result_complete
    from /lib64/libgio-2.0.so.0
  • #15 ??
    from /lib64/libgio-2.0.so.0
  • #16 g_main_context_dispatch
    from /lib64/libglib-2.0.so.0
  • #17 ??
    from /lib64/libglib-2.0.so.0
  • #18 g_main_loop_run
    from /lib64/libglib-2.0.so.0
  • #19 gtk_main
    at gtkmain.c line 1161
  • #20 main
    at main.c line 1005

Comment 4 Milan Crha 2012-07-18 20:31:14 UTC
I forgot to add, this is with gtk3-3.4.3-2.fc17.x86_64.
Comment 5 Federico Mena Quintero 2012-11-02 04:37:16 UTC

*** This bug has been marked as a duplicate of bug 687196 ***
Comment 6 Joachim 2013-01-07 22:45:47 UTC
I can still reproduce the Crash with GTK+ 3.6.3.
Now it's a SEGFAULT instead of a hit assertion. See attached backtrace.

I used the gtk3-demo to reproduce as described by Milan Crha in Comment 3:
a0) Prepare folder (in Terminal):
   cd /tmp; mkdir asdf && cd asdf; echo 1 > download.sh; 
   echo 2 > rda.py; echo 3 > report.sh; echo 4 > zzz.test
a) run gtk3-demo -> Pickers -> File
b) select folder /tmp/asdf; avoid Recently Used
b2) make sure, that displaying hidden files is un-checked
c) go back to the terminal and edit one file:
   vim report.sh, insert anything, save and quit with ':x'
d) wait
e) segfault


System Information: Debian Testing with GTK+ from experimental
GTK+ version 3.6.3
Comment 7 Joachim 2013-01-07 22:48:20 UTC
Created attachment 232946 [details]
backtrace with gtk+ 3.6.3

Backtrace for Comment 6
Comment 8 Matthias Clasen 2014-12-22 16:44:46 UTC
Hopefully fixed by f9c5799c82c7f683f699e2f08302683bcef99641