You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi! Thanks for making asciinema and agg and sharing them as Software Libre! 🙏
I recorded some cast file with asciinema 2.3.0, fed it to agg and it panicked. Note the "width": 0, "height": 0, those were produced by asciinema from…
export COLUMNS=90
export ROWS=20
…in the environment at recording time.
So now for the crashing agg:
# RUST_BACKTRACE=1 ~/.cargo/bin/agg ~/Desktop/bug.cast.txt out.gif |& sed "s,${USER},user123,"thread 'main' panicked at /home/user123/.cargo/git/checkouts/avt-68339788ba7d673e/28aed2b/src/buffer.rs:80:13:index out of bounds: the len is 0 but the index is 0stack backtrace: 0: rust_begin_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5 1: core::panicking::panic_fmt at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14 2: core::panicking::panic_bounds_check at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:162:5 3: <avt::terminal::Terminal as avt::parser::Executor>::print 4: avt::vt::Vt::feed_str 5: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once 6: std::thread::scoped::scope 7: agg::run 8: agg::mainnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.4 / 4 [=====================================================] 100.00 % 221.70/s
# sed -n '79,81p'~/.cargo/git/checkouts/avt-*/*/src/buffer.rs pub fn print(&mut self, (col, row): VisualPosition, cell: Cell) { self[row].print(col, cell); }
To Reproduce
Download the attached cast produced by asciinema 2.3.0
So the main problem is the recorder put 0x0 size in the cast file, which we should prevent from happening in the first place. But I think it's a good idea to add a check here in agg and bail if any of the dimensions is lower non-positive.
Describe the bug
Hi! Thanks for making asciinema and agg and sharing them as Software Libre! 🙏
I recorded some cast file with asciinema 2.3.0, fed it to agg and it panicked. Note the
"width": 0, "height": 0
, those were produced by asciinema from……in the environment at recording time.
So now for the crashing agg:
To Reproduce
~/.cargo/bin/agg bug.cast.txt out.gif
Expected behavior
No panic
Versions:
https://github.com/asciinema/agg#ec02812e
) — ec02812eAdditional context
Please see description
The text was updated successfully, but these errors were encountered: