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

crash on very small term size #198

Closed
extrawurst opened this issue Jul 14, 2020 · 2 comments
Closed

crash on very small term size #198

extrawurst opened this issue Jul 14, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@extrawurst
Copy link
Owner

panic: PanicInfo { payload: Any, message: Some(Trying to access position outside the buffer: x=10, y=10, area=Rect { x: 0, y: 0, width: 10, height: 11 }), location: Location { file: "/Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/buffer.rs", line: 245, col: 9 } }
trace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.50/src/backtrace/libunwind.rs:95
      backtrace::backtrace::trace_unsynchronized
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.50/src/backtrace/mod.rs:66
   1: backtrace::backtrace::trace
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.50/src/backtrace/mod.rs:53
   2: backtrace::capture::Backtrace::create
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.50/src/capture.rs:164
   3: backtrace::capture::Backtrace::new
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.50/src/capture.rs:128
   4: gitui::set_panic_handlers::{{closure}}
             at src/main.rs:316
   5: std::panicking::rust_panic_with_hook
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/panicking.rs:515
   6: rust_begin_unwind
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/panicking.rs:419
   7: std::panicking::begin_panic_fmt
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/panicking.rs:373
   8: tui::buffer::Buffer::index_of
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/buffer.rs:245
   9: tui::buffer::Buffer::get_mut
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/buffer.rs:212
  10: tui::buffer::Buffer::set_background
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/buffer.rs:349
  11: <tui::widgets::paragraph::Paragraph<T> as tui::widgets::Widget>::render
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/widgets/paragraph.rs:122
  12: tui::terminal::Frame<B>::render_widget
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/terminal.rs:65
  13: gitui::cmdbar::CommandBar::draw
             at src/cmdbar.rs:164
  14: gitui::app::App::draw
             at src/app.rs:126
  15: gitui::draw::{{closure}}
             at src/main.rs:183
  16: tui::terminal::Terminal<B>::draw
             at /Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.5/src/terminal.rs:187
  17: gitui::draw
             at src/main.rs:182
  18: gitui::main
             at src/main.rs:148
  19: std::rt::lang_start::{{closure}}
             at /Users/stephan/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67
  20: std::rt::lang_start_internal::{{closure}}
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/rt.rs:52
      std::panicking::try::do_call
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/panicking.rs:331
      std::panicking::try
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/panicking.rs:274
      std::panic::catch_unwind
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/panic.rs:394
      std::rt::lang_start_internal
             at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libstd/rt.rs:51
  21: std::rt::lang_start
             at /Users/stephan/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67
@extrawurst extrawurst added the bug Something isn't working label Jul 14, 2020
@alistaircarscadden
Copy link
Contributor

At a certain size, maybe the app should just try its best to fit a message like your terminal is way too small

@extrawurst
Copy link
Owner Author

😊 that would be one option... tbh I dont care that the ui will crap In such a size, I just dont want it to panic

@extrawurst extrawurst added this to the v0.9 milestone Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants