Skip to content

panic on small terminal when textinput for stash name is open #370

@extrawurst

Description

@extrawurst
panic: PanicInfo { payload: Any, message: Some(Trying to access position outside the buffer: x=9, y=2, area=Rect { x: 0, y: 0, width: 9, height: 9 }), location: Location { file: "/Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/tui-0.12.0/src/buffer.rs", line: 217, col: 9 } }
trace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/backtrace-0.3.53/src/backtrace/libunwind.rs:100:5
      backtrace::backtrace::trace_unsynchronized
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/backtrace-0.3.53/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/backtrace-0.3.53/src/backtrace/mod.rs:53:14
   2: backtrace::capture::Backtrace::create
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/backtrace-0.3.53/src/capture.rs:176:9
   3: backtrace::capture::Backtrace::new
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/backtrace-0.3.53/src/capture.rs:140:22
   4: gitui::set_panic_handlers::{{closure}}
             at src/main.rs:300:25
   5: std::panicking::rust_panic_with_hook
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:573:17
   6: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:476:9
   7: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:153:18
   8: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475:5
   9: std::panicking::begin_panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:429:5
  10: tui::buffer::Buffer::index_of
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/tui-0.12.0/src/buffer.rs:217:9
  11: tui::buffer::Buffer::get_mut
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/tui-0.12.0/src/buffer.rs:184:17
  12: <tui::widgets::clear::Clear as tui::widgets::Widget>::render
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/tui-0.12.0/src/widgets/clear.rs:32:17
  13: tui::terminal::Frame<B>::render_widget
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/tui-0.12.0/src/terminal.rs:103:9
  14: <gitui::components::textinput::TextInputComponent as gitui::components::DrawableComponent>::draw
             at src/components/textinput.rs:172:13
  15: <gitui::components::stashmsg::StashMsgComponent as gitui::components::DrawableComponent>::draw
             at src/components/stashmsg.rs:30:9
  16: gitui::app::App::draw_popups
             at src/app.rs:621:9
  17: gitui::app::App::draw
             at src/app.rs:205:9
  18: gitui::draw::{{closure}}
             at src/main.rs:184:25
  19: tui::terminal::Terminal<B>::draw
             at /Users/stephan/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/tui-0.12.0/src/terminal.rs:259:9
  20: gitui::draw
             at src/main.rs:183:5
  21: gitui::main
             at src/main.rs:149:13
  22: core::ops::function::FnOnce::call_once
             at /Users/stephan/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
  23: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /Users/stephan/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137:18
  24: std::rt::lang_start::{{closure}}
             at /Users/stephan/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:66:18
  25: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:373:40
      std::panicking::try
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:337:19
      std::panic::catch_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panic.rs:379:14
      std::rt::lang_start_internal
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/rt.rs:51:25
  26: std::rt::lang_start
             at /Users/stephan/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:65:5
  27: _main

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions