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 97591 - Nautilus crashed while moving files
Nautilus crashed while moving files
Status: RESOLVED DUPLICATE of bug 95786
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.0.x
Other Linux
: High critical
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-11-04 00:25 UTC by Manuel Clos
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
temporary patch to avoid the crash (727 bytes, patch)
2002-11-04 19:47 UTC, Manuel Clos
none Details | Review

Description Manuel Clos 2002-11-04 00:23:28 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
  • #0 wait4
    from /lib/libc.so.6
  • #1 __check_rhosts_file
    from /lib/libc.so.6
  • #2 waitpid
    from /lib/libpthread.so.0
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 647
  • #4 pthread_sighandler
    from /lib/libpthread.so.0
  • #5 sigaction
    from /lib/libc.so.6
  • #6 g_log
  • #7 compute_character_widths

------- 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.

Comment 1 Manuel Clos 2002-11-04 13:02:50 UTC
Confirming the crash, this happens always at

  • #7 compute_character_widths
there is a á caracter at the end of the string.

Comment 2 Manuel Clos 2002-11-04 19:22:43 UTC
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? :)


Comment 3 Manuel Clos 2002-11-04 19:47:09 UTC
Created attachment 12037 [details] [review]
temporary patch to avoid the crash
Comment 4 Manuel Clos 2002-11-04 19:54:35 UTC
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.
Comment 5 Luis Villa 2002-11-11 21:40:20 UTC
Eep. Adding PATCH keyword. Alex, Dave?
Comment 6 Kjartan Maraas 2003-07-09 08:51:33 UTC
Can someone give an opinion on this patch and the general situation?
Comment 7 Alexander Larsson 2003-07-10 12:13:27 UTC
This is fixed in head, and this is a dup of bug 95786.

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