-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
UTF-8 Error #2
Comments
@garak92 Thanks for your feedback. It may be caused by file encoding. You can check it using In order to reduce the complexity of processing CJK characters and emoji, csview only supports But the error message is not friendly however, I will improve it later. EDIT:
|
I wrote a fuzzer for this and discovered the same error, the problem seems to be the unwrap() method. Wrote a small fix in order to be able to continue with the fuzzing. |
Hello, I think I've found a bug and would like to report it to you.
Reported behavior: open a csv file and application crashes with utf-8 error.
Tested on this dataset: https://catalog.data.gov/dataset/traffic-data/resource/e46a5cc5-ed4d-4b8d-b750-18e6c9ec570e
Exact command:
csview monroe-county-crash-data2003-to-2015.csv
Backtrace:
thread 'main' panicked at 'called
Result::unwrap()on an
Errvalue: Error(Utf8 { pos: Some(Position { byte: 512345, line: 4326, record: 4326 }), err: Utf8Error { field: 9, valid_up_to: 18 } })', src/core.rs:12:37 note: run with
RUST_BACKTRACE=1environment variable to display a backtrace myuser@pop-os:~/Downloads$ RUST_BACKTRACE=1 csview monroe-county-crash-data2003-to-2015.csv thread 'main' panicked at 'called
Result::unwrap()on an
Errvalue: Error(Utf8 { pos: Some(Position { byte: 512345, line: 4326, record: 4326 }), err: Utf8Error { field: 9, valid_up_to: 18 } })', src/core.rs:12:37 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print_fmt at src/libstd/sys_common/backtrace.rs:78 3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt at src/libstd/sys_common/backtrace.rs:59 4: core::fmt::write at src/libcore/fmt/mod.rs:1076 5: std::io::Write::write_fmt at src/libstd/io/mod.rs:1537 6: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:62 7: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:49 8: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:198 9: std::panicking::default_hook at src/libstd/panicking.rs:217 10: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:526 11: rust_begin_unwind at src/libstd/panicking.rs:437 12: core::panicking::panic_fmt at src/libcore/panicking.rs:85 13: core::option::expect_none_failed at src/libcore/option.rs:1269 14: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::next 15: csview::main 16: std::rt::lang_start::{{closure}} 17: main 18: __libc_start_main 19: _start note: Some details are omitted, run with
RUST_BACKTRACE=fullfor a verbose backtrace.
Version of csview: 0.3.2-rc.0
OS: Pop!_OS 20.04 with Xanmod Kernel
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: