GNOME Bugzilla – Bug 97591
Nautilus crashed while moving files
Last modified: 2004-12-22 21:47:04 UTC
Package: nautilus Severity: critical Version: 2.0.7 Synopsis: Nautilus crashed while moving files Bugzilla-Product: nautilus Bugzilla-Component: File and Folder Operations BugBuddy-GnomeVersion: 2.0 (2.0.5) Description: Description of Problem: Nautilus crashed while moving files. How often does this happen? Not reproducible. Additional Information: Running last stable garnome (0.17.1) Debugging Information: Backtrace was generated from '/gnome/garnome/bin/nautilus' [New Thread 1024 (LWP 912)] [New Thread 2049 (LWP 913)] [New Thread 1026 (LWP 914)] [New Thread 2051 (LWP 915)] [New Thread 5124 (LWP 7649)] [New Thread 6149 (LWP 7657)] [New Thread 7174 (LWP 7699)] [New Thread 8199 (LWP 7731)] 0x40b50a59 in wait4 () from /lib/libc.so.6
+ Trace 29820
------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-11-03 19:23 ------- Reassigning to the default owner of the component, nautilus-maint@bugzilla.gnome.org.
Confirming the crash, this happens always at
+ Trace 29837
there is a á caracter at the end of the string.
Here is what I have found so far: The crash happens when the delayed dialog pops up. Then, some gtklabels make his size request. For this to happen, the width is calculated: Eel-ERROR **: file eel-pango-extensions.c: line 173 (compute_character_widths): assertion failed: (BEGINS_UTF8_CHAR (string[byte_index])) aborting... This should not happen. But it does because: I'm copying a utf8 clean directory name, but the subdirs are not utf8 clean so when they are displayed in the progress dialog, the assertion fails. For my surprise, using not utf8 clean strings in the "from:" field results in no crashes at all (:-?). Trying to make all strings utf8 clean doesn't solve the problem, since the real problem is in nautilus-file-operations-progress.c, in the set_text_unescaped_trimmed () function, where the text it receives is utf8 clean but after unescaping it isn't!!! At this point, I don't know where the bug is. Should unescaping a utf8 clean string produce another utf8 clean string? or isn't this a requirement? Since alex told me that all strings should be utf8 clean, I assume that the bug is in the unescaping function: gnome_vfs_unescape_string_for_display (text); So this is not a nautilus bug, but a gnome-vfs one. A temporary fix is to use the unescaped text when we detect that the text is not utf8 clean. Someone to show me the light? :)
Created attachment 12037 [details] [review] temporary patch to avoid the crash
with the above patch, I can't reproduce the crash anymore. On the other hand, it exposes not one, but thow bugs: - the first one is gnome_vfs_unescape_string_for_display () converting strings from clean utf8 to invalid utf8. - the second one, set_text_unescaped_trimmed () being called with invalid utf8 strings. This can be fixed using eel_make_valid_utf8() in nautilus-file-operations.c, before calling nautilus_file_operations_progress_new_file () Here is some output I get with the above patch: ** (nautilus:10543): WARNING **: [Invalid UTF-8] text not utf8 clean after unescape: /MP3/Mojinos Escozios/Demasiao perro pa trabaj , demasiao carvo pal rocanr¢ ** (nautilus:10543): WARNING **: text utf8 clean before unescape: YES ** (nautilus:10543): WARNING **: text before unescape: /MP3/Mojinos%20Escozios/Demasiao%20perro%20pa%20trabaj%A0%2C%20demasiao%20carvo%20pal%20rocanr%A2 ** (nautilus:10543): WARNING **: [Invalid UTF-8] text not utf8 clean after unescape: /almacen/mp3 para/Mojinos Escozios/Demasiao perro pa trabaj , demasiao carvo pal rocanr¢ ** (nautilus:10543): WARNING **: text utf8 clean before unescape: YES ** (nautilus:10543): WARNING **: text before unescape: /almacen/mp3%20para/Mojinos%20Escozios/Demasiao%20perro%20pa%20trabaj%A0%2C%20demasiao%20carvo%20pal%20rocanr%A2 ** (nautilus:10543): WARNING **: [Invalid UTF-8] text not utf8 clean after unescape: /MP3/Mojinos Escozios/Demasiao perro pa trabaj , demasiao carvo pal rocanr¢ ** (nautilus:10543): WARNING **: text utf8 clean before unescape: YES ** (nautilus:10543): WARNING **: text before unescape: /MP3/Mojinos%20Escozios/Demasiao%20perro%20pa%20trabaj%A0%2C%20demasiao%20carvo%20pal%20rocanr%A2 ** (nautilus:10543): WARNING **: [Invalid UTF-8] text not utf8 clean after unescape: /almacen/mp3 para/Mojinos Escozios/Demasiao perro pa trabaj , demasiao carvo pal rocanr¢ ** (nautilus:10543): WARNING **: text utf8 clean before unescape: YES ** (nautilus:10543): WARNING **: text before unescape: /almacen/mp3%20para/Mojinos%20Escozios/Demasiao%20perro%20pa%20trabaj%A0%2C%20demasiao%20carvo%20pal%20rocanr%A2 ** (nautilus:10543): WARNING **: [Invalid UTF-8] text not utf8 clean after unescape: 13 - Follome on the Eskay (Mi sof ).mp3 ** (nautilus:10543): WARNING **: text utf8 clean before unescape: NO Hope this helps.
Eep. Adding PATCH keyword. Alex, Dave?
Can someone give an opinion on this patch and the general situation?
This is fixed in head, and this is a dup of bug 95786. *** This bug has been marked as a duplicate of 95786 ***