Panic on busy mouse events
Problem: With the MouseTerminal
in lxterminal, press mouse and drag the pointer outside of the terminal window and fiddle with it a lot => panic:
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:345:21
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:211
3: std::panicking::default_hook
at libstd/panicking.rs:227
4: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:511
5: std::panicking::continue_panic_fmt
at libstd/panicking.rs:426
6: rust_begin_unwind
at libstd/panicking.rs:337
7: core::panicking::panic_fmt
at libcore/panicking.rs:92
8: core::panicking::panic
at libcore/panicking.rs:53
9: <core::option::Option<T>>::unwrap
at /checkout/src/libcore/macros.rs:20
10: termion::event::parse_csi::{{closure}}
at ~/.cargo/registry/src/github.com-1ecc6299db9ec823/termion-1.5.1/src/event.rs:161
11: termion::event::parse_csi
at ~/.cargo/registry/src/github.com-1ecc6299db9ec823/termion-1.5.1/src/event.rs:166
12: termion::event::parse_event
at ~/.cargo/registry/src/github.com-1ecc6299db9ec823/termion-1.5.1/src/event.rs:118
13: termion::input::parse_event
at ~/.cargo/registry/src/github.com-1ecc6299db9ec823/termion-1.5.1/src/input.rs:99
14: <termion::input::EventsAndRaw<R> as core::iter::iterator::Iterator>::next
at ~/.cargo/registry/src/github.com-1ecc6299db9ec823/termion-1.5.1/src/input.rs:77
15: <termion::input::Events<R> as core::iter::iterator::Iterator>::next
at ~/.cargo/registry/src/github.com-1ecc6299db9ec823/termion-1.5.1/src/input.rs:38
16: two::ui::grinui::GrinUI::process
at src/ui/grinui.rs:59
17: two::ui::grinui::GrinUI::react_once
at src/ui/grinui.rs:54
18: two::ui::grin::Grin::wait
at src/ui/grin.rs:63
19: two::main::{{closure}}
at src/main.rs:23
20: <core::result::Result<T, E>>::and_then
at /checkout/src/libcore/result.rs:621
21: two::main
at src/main.rs:22
22: std::rt::lang_start::{{closure}}
at /checkout/src/libstd/rt.rs:74
23: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:310
24: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
25: std::rt::lang_start_internal
at libstd/panicking.rs:289
at libstd/panic.rs:392
at libstd/rt.rs:58
26: std::rt::lang_start
at /checkout/src/libstd/rt.rs:74
27: main
28: __libc_start_main
29: _start