Bugzilla – Bug 355225
GtkFileChooser crashes on Tab completion
Last modified: 2008-06-04 18:47:36 UTC
There is some hideous performance problem when using the file-selector on large directories - quite possibly related to the auto-completion in the location box. I have 2700+ files in /tmp - most of them ~0 length, and trying to save a new file there /tmp/crash.ppt from evolution gives me a hang of about ~20 seconds [ perhaps much of that is I/O thrash ]. Having done that subsequent opening of the save-as dialog in (eg. gedit) takes ~3 seconds [ and this is a fast machine ]. should be easy to repeat with a simple loop that touches files in /tmp.
I'm rewriting the way completion works, so you shall be my guinea pig soon :)
This is still in need of fixing: opening /usr/lib in Nautilus takes approx. 20 sec to complete. OpenSUSE 11.0 Beta3plus. nautilus-2.22.2-26
confirm
Michael, can you please test this on openSUSE 11.0? The completion code is completely new there, and shouldn't have those problems.
not encouraging I'm afraid; I ran gedit: entered '/usr<tab>' in the entry- and didn't get an appending '/' despite that being unique and a directory; then '/lib/<tab>' and: ** ** Gtk:ERROR:(gtkfilechooserentry.c:942):install_completion_feedback_timer: assertion failed: (chooser_entry->completion_feedback_timeout_id == 0) 529d7306-c677-e74f-0d40f547-0b3e0f4e is dumped terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check Aborted #0 0xffffe430 in __kernel_vsyscall () #1 0xb6d8f900 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb6d91238 in *__GI_abort () at abort.c:88 #3 0xb6f33029 in IA__g_assertion_message (domain=0xb7b44f97 "Gtk", file=0xb7b5a485 "gtkfilechooserentry.c", line=942, func=0xb7b5a8e0 "install_completion_feedback_timer", message=0x870aaf8 "assertion failed: (chooser_entry->completion_feedback_timeout_id == 0)") at gtestutils.c:1218 #4 0xb6f3354d in IA__g_assertion_message_expr (domain=0xb7b44f97 "Gtk", file=0xb7b5a485 "gtkfilechooserentry.c", line=942, func=0xb7b5a8e0 "install_completion_feedback_timer", expr=0xb7b5a55c "chooser_entry->completion_feedback_timeout_id == 0") at gtestutils.c:1229 #5 0xb7979e9c in pop_up_completion_feedback (chooser_entry=0x85b9810, feedback=0xb7b5a4fa "Completing...") at gtkfilechooserentry.c:942 #6 0xb797b53c in gtk_file_chooser_entry_focus (widget=0x85b9810, direction=GTK_DIR_TAB_FORWARD) at gtkfilechooserentry.c:1110 #7 0xb79dbc56 in _gtk_marshal_BOOLEAN__ENUM (closure=0x8257548, return_value=0xbf93e598, n_param_values=2, param_values=0xbf93e648, invocation_hint=0xbf93e584, marshal_data=0xb797b430) at gtkmarshalers.c:164 #8 0xb6f90389 in g_type_class_meta_marshal (closure=0x8257548, return_value=0xbf93e598, n_param_values=2, param_values=0xbf93e648, invocation_hint=0xbf93e584, marshal_data=0xa8) at gclosure.c:567 #9 0xb6f91b68 in IA__g_closure_invoke (closure=0x8257548, return_value=0xbf93e598, n_param_values=2, param_values=0xbf93e648, invocation_hint=0xbf93e584) at gclosure.c:490 #10 0xb6fa5e7f in signal_emit_unlocked_R (node=0x8257b00, detail=0, instance=0x85b9810, emission_return=0xbf93e808, instance_and_params=0xbf93e648) at gsignal.c:2478 #11 0xb6fa750c in IA__g_signal_emit_valist (instance=0x85b9810, signal_id=43, detail=0, var_args=0xbf93e860 "|�223� \0336\b\210�223�6\200\223� \0336\b\001") at gsignal.c:2209 #12 0xb6fa7ae6 in IA__g_signal_emit (instance=0x85b9810, signal_id=43, detail=0) at gsignal.c:2243 #13 0xb7b07c88 in IA__gtk_widget_child_focus (widget=0x85b9810, direction=GTK_DIR_TAB_FORWARD) at gtkwidget.c:6781 #14 0xb793a04a in gtk_container_focus (widget=0x8361b20, direction=GTK_DIR_TAB_FORWARD) at gtkcontainer.c:2221 #15 0xb79dbc56 in _gtk_marshal_BOOLEAN__ENUM (closure=0x8257548, return_value=0xbf93ea88, n_param_values=2, param_values=0xbf93eb38, invocation_hint=0xbf93ea74, marshal_data=0xb7939e80) at gtkmarshalers.c:164 #16 0xb6f90389 in g_type_class_meta_marshal (closure=0x8257548, return_value=0xbf93ea88, n_param_values=2, param_values=0xbf93eb38, invocation_hint=0xbf93ea74, marshal_data=0xa8) at gclosure.c:567 #17 0xb6f91b68 in IA__g_closure_invoke (closure=0x8257548, return_value=0xbf93ea88, n_param_values=2, param_values=0xbf93eb38, invocation_hint=0xbf93ea74) at gclosure.c:490 #18 0xb6fa5e7f in signal_emit_unlocked_R (node=0x8257b00, detail=0, instance=0x8361b20, emission_return=0xbf93ecf8, instance_and_params=0xbf93eb38) at gsignal.c:2478 #19 0xb6fa750c in IA__g_signal_emit_valist (instance=0x8361b20, signal_id=43, detail=0, var_args=0xbf93ed50 "l�223�\210rK\bx�223�6\200\223�\210rK\b\001") at gsignal.c:2209 #20 0xb6fa7ae6 in IA__g_signal_emit (instance=0x8361b20, signal_id=43, detail=0) at gsignal.c:2243 highly repeatable (it seems) - if you press 'tab' too often while it is completing: bang ....
Ooooh, good catch! I had tested pressing Tab repeatedly when a slow folder is still loading; you hit the case where the folder is already loaded. I'll attach a patch in a second.
I'll re-title this to reflect the crash and request a ship-stopper. Michael, if you find that the file chooser is still slow when completing, please file a separate bug or catch me on IRC.
Created attachment 219883 [details] gtk2-bnc355225-filechooser-tab-completion-crash.diff
The patch looks good to apply.
Submitted to autobuild for STABLE, and patchinfo with swampid 17290. * Tue Jun 03 2008 - federico@novell.com - Added gtk2-bnc355225-filechooser-tab-completion-crash.diff to fix the crash in https://bugzilla.novell.com/show_bug.cgi?id=355225 - The file chooser could crash when pressing Tab repeatedly to do completion.
*** Bug 385494 has been marked as a duplicate of this bug. ***