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

Panic in char::is_whitespace #194

Closed
osa1 opened this issue May 10, 2020 · 1 comment
Closed

Panic in char::is_whitespace #194

osa1 opened this issue May 10, 2020 · 1 comment
Labels
Milestone

Comments

@osa1
Copy link
Owner

osa1 commented May 10, 2020

I was investigating #193 and found an unrelated bug. Backtrace:

Backtrace
thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 4', src/libcore/unicode/unicode_data.rs:75:40
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:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1532
   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:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  11: rust_begin_unwind
             at src/libstd/panicking.rs:385
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:89
  13: core::panicking::panic_bounds_check
             at src/libcore/panicking.rs:65
  14: core::unicode::unicode_data::skip_search
             at src/libcore/unicode/unicode_data.rs:0
  15: core::unicode::unicode_data::white_space::lookup
             at src/libcore/unicode/unicode_data.rs:541
  16: core::char::methods::<impl char>::is_whitespace
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/char/methods.rs:645
  17: libtiny_tui::msg_area::line::Line::add_text
             at libtiny_tui/src/msg_area/line.rs:146
  18: libtiny_tui::msg_area::MsgArea::add_text
             at libtiny_tui/src/msg_area/mod.rs:147
  19: libtiny_tui::messaging::MessagingUI::add_privmsg
             at libtiny_tui/src/messaging.rs:357
  20: libtiny_tui::tui::TUI::add_privmsg::{{closure}}
             at libtiny_tui/src/tui.rs:1144
  21: libtiny_tui::tui::TUI::apply_to_target
             at libtiny_tui/src/tui.rs:1082
  22: libtiny_tui::tui::TUI::add_privmsg
             at libtiny_tui/src/tui.rs:1143
  23: <libtiny_tui::TUI as libtiny_ui::UI>::add_privmsg
             at libtiny_tui/src/lib.rs:156
  24: <libtiny_ui::CombinedUIs<UI1,UI2> as libtiny_ui::UI>::add_privmsg
             at ./libtiny_ui/src/lib.rs:244
  25: tiny::conn::handle_irc_msg
             at tiny/src/conn.rs:413
  26: tiny::conn::handle_conn_ev
             at tiny/src/conn.rs:103
  27: tiny::conn::task::{{closure}}
             at tiny/src/conn.rs:18
  28: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  29: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/core.rs:163
  30: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/loom/std/unsafe_cell.rs:14
  31: tokio::runtime::task::core::Core<T,S>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/core.rs:148
  32: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/harness.rs:108
  33: core::ops::function::FnOnce::call_once
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  34: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panic.rs:318
  35: std::panicking::try::do_call
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:297
  36: __rust_try
  37: std::panicking::try
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:274
  38: std::panic::catch_unwind
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panic.rs:394
  39: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/harness.rs:84
  40: tokio::runtime::task::raw::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/raw.rs:104
  41: tokio::runtime::task::raw::RawTask::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/raw.rs:66
  42: tokio::runtime::task::Notified<S>::run
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/mod.rs:169
  43: tokio::task::local::LocalSet::tick::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:406
  44: tokio::coop::budget::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:85
  45: std::thread::local::LocalKey<T>::try_with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
  46: std::thread::local::LocalKey<T>::with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
  47: tokio::coop::budget
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:79
  48: tokio::task::local::LocalSet::tick
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:406
  49: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:527
  50: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/macros/scoped_tls.rs:64
  51: tokio::task::local::LocalSet::with
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:440
  52: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:516
  53: tokio::task::local::LocalSet::run_until::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:390
  54: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  55: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::{{closure}}::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:131
  56: tokio::coop::budget::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:97
  57: std::thread::local::LocalKey<T>::try_with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
  58: std::thread::local::LocalKey<T>::with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
  59: tokio::coop::budget
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:79
  60: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:131
  61: tokio::runtime::basic_scheduler::enter::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:213
  62: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/macros/scoped_tls.rs:64
  63: tokio::runtime::basic_scheduler::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:213
  64: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:123
  65: tokio::runtime::Runtime::block_on::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/mod.rs:418
  66: tokio::runtime::context::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/context.rs:72
  67: tokio::runtime::handle::Handle::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/handle.rs:39
  68: tokio::runtime::Runtime::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/mod.rs:415
  69: tokio::task::local::LocalSet::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:351
  70: tiny::run
             at tiny/src/main.rs:85
  71: tiny::main
             at tiny/src/main.rs:60
  72: std::rt::lang_start::{{closure}}
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  73: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  74: std::panicking::try::do_call
             at src/libstd/panicking.rs:297
  75: std::panicking::try
             at src/libstd/panicking.rs:274
  76: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  77: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  78: std::rt::lang_start
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  79: main
  80: __libc_start_main
  81: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SendError(Msg(Msg { pfx: Some(Server("kornbluth.freenode.net")), cmd: Reply { num: 322, params: ["osa1", "#wikipedia-zh-transpt", "7", "維基百科地理及交通群︰與Telegram群 @wikipedia_zh_geo_and_transpt 及Discord群77n7vnu (https://discord.gg/77n7vnu)互聯。"] } }))', libtiny_client/src/lib.rs:446:13
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:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1532
   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:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  11: rust_begin_unwind
             at src/libstd/panicking.rs:385
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:89
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1272
  14: core::result::Result<T,E>::unwrap
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1005
  15: libtiny_client::main_loop::{{closure}}
             at libtiny_client/src/lib.rs:446
  16: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  17: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/core.rs:163
  18: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/loom/std/unsafe_cell.rs:14
  19: tokio::runtime::task::core::Core<T,S>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/core.rs:148
  20: tokio::runtime::task::harness::Harness<T,S>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/harness.rs:108
  21: core::ops::function::FnOnce::call_once
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/ops/function.rs:232
  22: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panic.rs:318
  23: std::panicking::try::do_call
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:297
  24: __rust_try
  25: std::panicking::try
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panicking.rs:274
  26: std::panic::catch_unwind
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/panic.rs:394
  27: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/harness.rs:84
  28: tokio::runtime::task::raw::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/raw.rs:104
  29: tokio::runtime::task::raw::RawTask::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/raw.rs:66
  30: tokio::runtime::task::Notified<S>::run
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/task/mod.rs:169
  31: tokio::task::local::LocalSet::tick::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:406
  32: tokio::coop::budget::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:85
  33: std::thread::local::LocalKey<T>::try_with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
  34: std::thread::local::LocalKey<T>::with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
  35: tokio::coop::budget
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:79
  36: tokio::task::local::LocalSet::tick
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:406
  37: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:527
  38: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/macros/scoped_tls.rs:64
  39: tokio::task::local::LocalSet::with
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:440
  40: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:516
  41: tokio::task::local::LocalSet::run_until::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:390
  42: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  43: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::{{closure}}::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:131
  44: tokio::coop::budget::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:97
  45: std::thread::local::LocalKey<T>::try_with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
  46: std::thread::local::LocalKey<T>::with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
  47: tokio::coop::budget
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:79
  48: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:131
  49: tokio::runtime::basic_scheduler::enter::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:213
  50: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/macros/scoped_tls.rs:64
  51: tokio::runtime::basic_scheduler::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:213
  52: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:123
  53: tokio::runtime::Runtime::block_on::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/mod.rs:418
  54: tokio::runtime::context::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/context.rs:72
  55: tokio::runtime::handle::Handle::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/handle.rs:39
  56: tokio::runtime::Runtime::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/mod.rs:415
  57: tokio::task::local::LocalSet::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:351
  58: tiny::run
             at tiny/src/main.rs:85
  59: tiny::main
             at tiny/src/main.rs:60
  60: std::rt::lang_start::{{closure}}
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  61: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  62: std::panicking::try::do_call
             at src/libstd/panicking.rs:297
  63: std::panicking::try
             at src/libstd/panicking.rs:274
  64: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  65: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  66: std::rt::lang_start
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  67: main
  68: __libc_start_main
  69: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Closed(Quit(None))', libtiny_client/src/lib.rs:243:9
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:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1532
   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:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  11: rust_begin_unwind
             at src/libstd/panicking.rs:385
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:89
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1272
  14: core::result::Result<T,E>::unwrap
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1005
  15: libtiny_client::Client::quit
             at libtiny_client/src/lib.rs:243
  16: tiny::ui::handle_input_ev
             at tiny/src/ui.rs:38
  17: tiny::ui::task::{{closure}}
             at tiny/src/ui.rs:22
  18: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  19: tiny::run::{{closure}}
             at tiny/src/main.rs:156
  20: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  21: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:523
  22: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/macros/scoped_tls.rs:64
  23: tokio::task::local::LocalSet::with
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:440
  24: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:516
  25: tokio::task::local::LocalSet::run_until::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:390
  26: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:61
  27: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::{{closure}}::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:131
  28: tokio::coop::budget::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:97
  29: std::thread::local::LocalKey<T>::try_with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
  30: std::thread::local::LocalKey<T>::with
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
  31: tokio::coop::budget
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/coop.rs:79
  32: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:131
  33: tokio::runtime::basic_scheduler::enter::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:213
  34: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/macros/scoped_tls.rs:64
  35: tokio::runtime::basic_scheduler::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:213
  36: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/basic_scheduler.rs:123
  37: tokio::runtime::Runtime::block_on::{{closure}}
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/mod.rs:418
  38: tokio::runtime::context::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/context.rs:72
  39: tokio::runtime::handle::Handle::enter
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/handle.rs:39
  40: tokio::runtime::Runtime::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/runtime/mod.rs:415
  41: tokio::task::local::LocalSet::block_on
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.18/src/task/local.rs:351
  42: tiny::run
             at tiny/src/main.rs:85
  43: tiny::main
             at tiny/src/main.rs:60
  44: std::rt::lang_start::{{closure}}
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  45: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  46: std::panicking::try::do_call
             at src/libstd/panicking.rs:297
  47: std::panicking::try
             at src/libstd/panicking.rs:274
  48: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  49: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  50: std::rt::lang_start
             at /home/omer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  51: main
  52: __libc_start_main
  53: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

To reproducer, run LIST in freenode in debug build and stay on the server tab so that every update is rendered. At some point this panic should be printed to stderr.

This is probably related to how to unsafely convert bytes into Rust strings which are expected to be UTF-8 encoded.

@osa1 osa1 added the bug label May 10, 2020
@osa1
Copy link
Owner Author

osa1 commented May 10, 2020

This is probably caused by one of the from_utf8_unchecked in wire message parser when the message is not really UTF-8 encoded.

@osa1 osa1 added this to the 0.5.2 milestone May 11, 2020
@osa1 osa1 closed this as completed in fb0538c May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant