Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program crashes when processing files with (german) special chars #44

Closed
Lakrimar opened this issue Oct 6, 2020 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@Lakrimar
Copy link

Lakrimar commented Oct 6, 2020

Error Description

I wanted to search for duplicates but the program crashes when processing a file with a special char (ü).
I used czkawka version 1.0.0

I also had FSLint installed and tried the same search with that to prevent hardware or filesystem issues and it worked fine.

Start Parameter

RUST_BACKTRACE=full ./czkawka_gui

Stacktrace

thread 'main' panicked at 'called Result::unwrap() on an Err value: "\x81ber die Firma.txt"', czkawka_core/src/duplicate.rs:253:92
stack backtrace:
0: 0x5573ba7259b5 -
1: 0x5573ba74979c -
2: 0x5573ba7239b2 -
3: 0x5573ba7282b0 -
4: 0x5573ba727ffc -
5: 0x5573ba7288f3 -
6: 0x5573ba7284eb -
7: 0x5573ba748131 -
8: 0x5573ba747f53 -
9: 0x5573ba6ed09c -
10: 0x5573ba6dda16 -
11: 0x7f698b113346 -
12: 0x7f698b12e9ff - g_signal_emit_valist
13: 0x7f698b12f12f - g_signal_emit
14: 0x7f698c4b0add -
15: 0x7f698c4b0b35 -
16: 0x7f698b113346 -
17: 0x7f698b12e9ff - g_signal_emit_valist
18: 0x7f698b12f12f - g_signal_emit
19: 0x7f698c4aef90 -
20: 0x7f69855f3dae - ffi_call_unix64
21: 0x7f69855f371f - ffi_call
22: 0x7f698b113ced - g_cclosure_marshal_generic_va
23: 0x7f698b113346 -
24: 0x7f698b12e9ff - g_signal_emit_valist
25: 0x7f698b12f12f - g_signal_emit
26: 0x7f698c56ba36 -
27: 0x7f698b116008 - g_cclosure_marshal_VOID__BOXEDv
28: 0x7f698b113346 -
29: 0x7f698b12e9ff - g_signal_emit_valist
30: 0x7f698b12f12f - g_signal_emit
31: 0x7f698c568d0e -
32: 0x7f698c56a2fb -
33: 0x7f698c56cf5e -
34: 0x7f698c53a721 - gtk_event_controller_handle_event
35: 0x7f698c6fa26b -
36: 0x7f698c5b48f7 -
37: 0x7f698b113346 -
38: 0x7f698b12e3cd - g_signal_emit_valist
39: 0x7f698b12f12f - g_signal_emit
40: 0x7f698c6fc534 -
41: 0x7f698c5b186e -
42: 0x7f698c5b3948 - gtk_main_do_event
43: 0x7f698c0c4765 -
44: 0x7f698c0f4f92 -
45: 0x7f698ae38417 - g_main_context_dispatch
46: 0x7f698ae38650 -
47: 0x7f698ae38962 - g_main_loop_run
48: 0x7f698c5b2a25 - gtk_main
49: 0x5573ba6cca20 -
50: 0x5573ba6e7033 -
51: 0x5573ba728cc3 -
52: 0x5573ba6ce592 -
53: 0x7f698a3e1b97 - __libc_start_main
54: 0x5573ba6c11ae -
55: 0x0 -

File related information

über die Firma.txt: Non-ISO extended-ASCII text, with CRLF line terminators

System information

OS: Linux Mint 19.3 Tricia x86_64
Kernel: 5.4.0-48-generic
FileSystem: ext4

@qarmin qarmin added the bug Something isn't working label Oct 6, 2020
@qarmin
Copy link
Owner

qarmin commented Oct 6, 2020

Crash should be fixed by 3b63798
but this only skip files/folders with invalid unicode names.
I'm searching how to handle this properly

@qarmin
Copy link
Owner

qarmin commented Oct 6, 2020

Can you send here this file?(Without content of course)
I can't reproduce crash when processing file with name über die Firma.txt (I suspect that my ü have different code than yours)

@Lakrimar
Copy link
Author

Lakrimar commented Oct 6, 2020

I just tried to upload it but GitHub tells me that "Something went really wrong, and we can't process that file"...
I was able to copy it, to modify it and stat and file does not complain. On command line it looks quite normal...

I performed an ls -fa | cat -v and got the following output:
"M-CM-<ber die Firma.txt"
This file has been created 2003 on a Windows system - so I really don't know what type of encoding it is...

@qarmin
Copy link
Owner

qarmin commented Oct 6, 2020

I'm not sure if FSlint check this files with invalid names or just ignore it as now Czkawka do.
Until String will support non Unicode names, there is nothing to do with it.
I added it to features which will probably never be implemented.

@KarolS
Copy link

KarolS commented Oct 11, 2020

Until String will support non Unicode names, there is nothing to do with it.

Don't use String for file paths, use std::ffi::OsString.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants