Skip to content

Opening trash causes a crash if there's a directory containing % in the name #1060

@ghost

Description

Hello.

Opening the Trash causes a crash in Nemo 2.8.6 if there's a file or directory containing the % symbol in the name.

Example:
[lorenzo@elisa ~/.local/share/Trash/files]$ mkdir "Jets To Brazil - 1998 - Orange Rhyming Dictionary -flac%"

Crash:

[lorenzo@elisa ~/.local/share/Trash/files]$ nemo
Initializing folder-color-switcher extension...

(nemo:14543): GLib-GIO-CRITICAL **: g_file_new_for_path: assertion 'path != NULL' failed
**
ERROR:nemo-file.c:663:nemo_file_get_internal: assertion failed: (location != NULL)
Aborted
[lorenzo@elisa ~/.local/share/Trash/files]$ 

GDB thread apply all bt:

[lorenzo@elisa ~/.local/share/Trash/files]$ gdb nemo
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nemo...(no debugging symbols found)...done.
(gdb) start
Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n]) 

Starting program: /usr/bin/nemo 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[New Thread 0x7fffed822700 (LWP 14565)]
[New Thread 0x7fffed021700 (LWP 14566)]
[New Thread 0x7fffec820700 (LWP 14567)]
Initializing folder-color-switcher extension...
[New Thread 0x7fffd5cc5700 (LWP 14568)]
[New Thread 0x7fffd4bb4700 (LWP 14570)]
[New Thread 0x7fffcffff700 (LWP 14571)]
[New Thread 0x7fffcea05700 (LWP 14572)]
[New Thread 0x7fffcde7b700 (LWP 14574)]
[Thread 0x7fffed021700 (LWP 14566) exited]
[Thread 0x7fffcffff700 (LWP 14571) exited]
[Thread 0x7fffd4bb4700 (LWP 14570) exited]
[Thread 0x7fffcea05700 (LWP 14572) exited]
[New Thread 0x7fffcea05700 (LWP 14575)]

(nemo:14561): GLib-GIO-CRITICAL **: g_file_new_for_path: assertion 'path != NULL' failed
**
ERROR:nemo-file.c:663:nemo_file_get_internal: assertion failed: (location != NULL)

Program received signal SIGABRT, Aborted.
0x00007ffff41cbcc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) 

(gdb) thread apply all bt

Thread 10 (Thread 0x7fffcea05700 (LWP 14575)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007ffff507cce5 in g_cond_wait_until ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff50111c1 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff5060862 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff505ff05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff4562182 in start_thread (arg=0x7fffcea05700)
    at pthread_create.c:312
#6  0x00007ffff428f47d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 9 (Thread 0x7fffcde7b700 (LWP 14574)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007ffff507cce5 in g_cond_wait_until ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff50111c1 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff5060862 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff505ff05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff4562182 in start_thread (arg=0x7fffcde7b700)
---Type <return> to continue, or q <return> to quit---
    at pthread_create.c:312
#6  0x00007ffff428f47d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7fffd5cc5700 (LWP 14568)):
#0  0x00007ffff428212d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff503afe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff503b0ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff503b129 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff505ff05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff4562182 in start_thread (arg=0x7fffd5cc5700)
    at pthread_create.c:312
#6  0x00007ffff428f47d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7fffec820700 (LWP 14567)):
#0  0x00007ffff428212d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff503afe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff503b0ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffeda471ad in ?? ()
   from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
---Type <return> to continue, or q <return> to quit---
#4  0x00007ffff505ff05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff4562182 in start_thread (arg=0x7fffec820700)
    at pthread_create.c:312
#6  0x00007ffff428f47d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fffed822700 (LWP 14565)):
#0  0x00007ffff428212d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff503afe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff503b30a in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff5622336 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff505ff05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff4562182 in start_thread (arg=0x7fffed822700)
    at pthread_create.c:312
#6  0x00007ffff428f47d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7ffff7fba9c0 (LWP 14561)):
#0  0x00007ffff41cbcc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff41cf0d8 in __GI_abort () at abort.c:89
#2  0x00007ffff505f165 in g_assertion_message ()
---Type <return> to continue, or q <return> to quit---
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff505f1fa in g_assertion_message_expr ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00000000004f3491 in ?? ()
#5  0x00000000004f8706 in ?? ()
#6  0x00000000004f98e9 in ?? ()
#7  0x00000000004f9d10 in ?? ()
#8  0x0000000000452816 in ?? ()
#9  0x00007ffff6bfd8b8 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#10 0x00007ffff502ac00 in g_hash_table_foreach ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff6bfd7bb in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#12 0x00007ffff6c02bbf in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#13 0x00007ffff6cc6758 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007ffff530a5e7 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff5323088 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff5323ce2 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff6bff224 in gtk_cell_area_apply_attributes ()
   from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#18 0x00007ffff6dc87ef in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
---Type <return> to continue, or q <return> to quit---
#19 0x00007ffff6dccd4d in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#20 0x00007ffff6dccec6 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#21 0x00007ffff6dcd069 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#22 0x00007ffff6df39d4 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#23 0x00007ffff530a5e7 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff5323088 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007ffff5324212 in g_signal_emit_by_name ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007ffff68a36e4 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#27 0x00007ffff6895ec8 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#28 0x00007ffff503b703 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff503ace5 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff503b048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff503b0ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff55edb9c in g_application_run ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#33 0x0000000000430dc6 in ?? ()
#34 0x00007ffff41b6ec5 in __libc_start_main (main=0x430d00, argc=1, 
    argv=0x7fffffffe048, init=<optimised out>, fini=<optimised out>, 
---Type <return> to continue, or q <return> to quit---
    rtld_fini=<optimised out>, stack_end=0x7fffffffe038) at libc-start.c:287
#35 0x0000000000430e23 in ?? ()
(gdb) 

Removing the file manually fixes the issue.
[lorenzo@elisa ~/.local/share/Trash/files]$ rm -rf Jets\ To\ Brazil\ -\ 1998\ -\ Orange\ Rhyming\ Dictionary\ -flac%/

Also: #792 and maybe #1024

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions