As the title says, running cat /dev/urandom
consistently crashes alacritty. Apparently some random escape codes send it into a state where this condition is triggered: https://github.com/jwilm/alacritty/blob/master/src/term/mod.rs#L634. Here is a log with backtrace: https://linx.li/aomx2zxa.ext
Great project btw, good luck! :)
Thanks for the report! At least the parser doesn't choke on it :).
There's a number of places where we don't coerce the cursor to be within the bounds of the grid. Doing so might fix this issue.
Still panicking in a couple of places:
thread 'pty reader' panicked at 'ansi::ClearMode::Above not implemented', src/term/mod.rs:941
stack backtrace:
1: 0x55be6fb2259a - std::sys::imp::backtrace::tracing::imp::write::h2b860f17b6b0f511
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x55be6fb2790f - std::panicking::default_hook::{{closure}}::hedea7d569eb1e6b8
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:349
3: 0x55be6fb2750e - std::panicking::default_hook::he87e0c76c89c52a4
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:365
4: 0x55be6fb27db7 - std::panicking::rust_panic_with_hook::h304127bde2d3d5e2
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:553
5: 0x55be6fa006c4 - std::panicking::begin_panic::h1dc990fced681ffe
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:515
6: 0x55be6fa042d5 - vte::Parser::perform_action::h26c5257024b70aee
at /home/jwilm/code/alacritty/<panic macros>:3
at /home/jwilm/code/alacritty/src/ansi.rs:556
at /home/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:205
7: 0x55be6fa1507a - <alacritty::event_loop::EventLoop<Io>>::spawn::{{closure}}::h6e25bd11b2170a6c
at /home/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:158
at /home/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:137
at /home/jwilm/code/alacritty/src/ansi.rs:85
at /home/jwilm/code/alacritty/src/event_loop.rs:211
at /home/jwilm/code/alacritty/src/event_loop.rs:308
thread 'pty reader' panicked at 'swap_lines dst out of bounds; len=24, dst=24', src/grid.rs:163
stack backtrace:
1: 0x556fa775059a - std::sys::imp::backtrace::tracing::imp::write::h2b860f17b6b0f511
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x556fa775590f - std::panicking::default_hook::{{closure}}::hedea7d569eb1e6b8
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:349
3: 0x556fa775550e - std::panicking::default_hook::he87e0c76c89c52a4
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:365
4: 0x556fa7755db7 - std::panicking::rust_panic_with_hook::h304127bde2d3d5e2
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:553
5: 0x556fa7755c44 - std::panicking::begin_panic::h814f60faa3ce8314
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:515
6: 0x556fa7755b69 - std::panicking::begin_panic_fmt::hf4f7d700fa077693
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:499
7: 0x556fa764a967 - alacritty::term::Term::scroll_up_relative::h162062cbd9d5d2ae
at /home/jwilm/code/alacritty/<panic macros>:8
at /home/jwilm/code/alacritty/src/grid.rs:138
at /home/jwilm/code/alacritty/src/term/mod.rs:594
8: 0x556fa762fb8b - vte::Parser::perform_action::h26c5257024b70aee
at /home/jwilm/code/alacritty/src/term/mod.rs:810
at /home/jwilm/code/alacritty/src/ansi.rs:568
at /home/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:205
9: 0x556fa764307a - <alacritty::event_loop::EventLoop<Io>>::spawn::{{closure}}::h6e25bd11b2170a6c
at /home/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:158
at /home/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:137
One more to add. I couldn't find an open issue for this one:
Commit: 2fa271419c4765f7758dcf336fe0b913c12c18a6
thread 'pty reader' panicked at 'attempt to subtract with overflow', src/index.rs:168
stack backtrace:
1: 0x102beae9a - std::sys::imp::backtrace::tracing::imp::write::h1461f67be4bf68a9
2: 0x102bed23f - std::panicking::default_hook::{{closure}}::h6dba65b2b498d274
3: 0x102becee7 - std::panicking::default_hook::ha8ecbcff1f59e805
4: 0x102bed706 - std::panicking::rust_panic_with_hook::h5ceed7bd7aef311a
5: 0x102bed554 - std::panicking::begin_panic::h091a980eb2ddd29a
6: 0x102bed4c2 - std::panicking::begin_panic_fmt::h063a49cc71e3d103
7: 0x102bed427 - rust_begin_unwind
8: 0x102c155e0 - core::panicking::panic_fmt::h59374b8a88ef3536
9: 0x102c154e4 - core::panicking::panic::he4f8d5c0f01c5414
10: 0x10292a301 - <alacritty::index::Line as core::ops::Sub>::sub::hf56240524a3b3d20
11: 0x102958974 - alacritty::term::Term::scroll_down_relative::h17832db7c7cd0212
12: 0x102934b06 - <alacritty::term::Term as alacritty::ansi::Handler>::insert_blank_lines::hf4bfabc4710cd1ad
13: 0x10294e116 - <alacritty::ansi::Performer<'a, H, W> as vte::Perform>::csi_dispatch::h4ad960a650a87e60
14: 0x1028e6990 - vte::Parser::perform_action::hae92f4f3be45f35d
15: 0x1028e6e96 - vte::Parser::perform_state_change::hcd974f7189d6307e
16: 0x1028e7154 - vte::Parser::advance::hfbcbd9a431c54361
17: 0x1029566dc - alacritty::ansi::Processor::advance::h8aa55517e89b95a8
18: 0x102922fa1 - <alacritty::event_loop::EventLoop<Io>>::pty_read::he09815a6e7f0c6c5
19: 0x1029226df - <alacritty::event_loop::EventLoop<Io>>::spawn::{{closure}}::hc8cce598d7c221bf
20: 0x102952784 - <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once::he8d9ee1af400fb51
21: 0x1028e65df - std::panicking::try::do_call::ha1ffc19119230164
22: 0x102bee5da - __rust_maybe_catch_panic
23: 0x1028e5beb - std::panicking::try::h1d88e2383fd5222f
24: 0x1028e3c54 - std::panic::catch_unwind::hb5a6f0073814bc71
25: 0x1028e53ac - std::thread::Builder::spawn::{{closure}}::h0de6bfd35f37e74c
26: 0x10291c869 - <F as alloc::boxed::FnBox<A>>::call_box::h7878f3467aa35fcc
27: 0x102bec914 - std::sys::imp::thread::Thread::new::thread_start::haeb202749da670ee
28: 0x7fff9f33caaa - _pthread_body
29: 0x7fff9f33c9f6 - _pthread_start
Most helpful comment
Thanks for the report! At least the parser doesn't choke on it :).
There's a number of places where we don't coerce the cursor to be within the bounds of the grid. Doing so might fix this issue.