Skip to content

Crashes with overlays in small-sized window #1585

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

Closed
AnonymouX47 opened this issue Mar 4, 2023 · 1 comment
Closed

Crashes with overlays in small-sized window #1585

AnonymouX47 opened this issue Mar 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@AnonymouX47
Copy link

Describe the bug
Git UI crashes (with error code 101) when an overlay is open and the terminal size is small (in my case, width < 60 columns and/or height < 20 lines). Overlays I tried include the Branches and Submodules views but there may be others.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Status tab.
  2. Resize the terminal window till the width is less than 60 columns or height less than 20 lines.
  3. Hit b (or whatever key) for the Branches view.
  4. Crashes with error code 101.

Also occurs if the terminal window is resized after the overlay has been opened.

Expected behavior
The overlay should automatically readjust to fit within the terminal window, possibly by clipping it's content per line.

Context (please complete the following information):

Software version

gitui 0.22.1

Operating system

Linux 5.15.94-1-MANJARO

Compile time information

  • Profile: release
  • Target triple: x86_64-unknown-linux-gnu
  • Family: unix
  • OS: linux
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2
  • Host: x86_64-unknown-linux-gnu

Environment variables

SHELL=/bin/zsh
EDITOR=vim
GIT_EDITOR=<not set>
VISUAL=<not set>

Additional context
Relevant logs (produced with gitui -l):

...
06:29:49 [TRACE] (1) gitui::app: [src/app.rs:382] event: Input(Key(KeyEvent { code: Char('b'), modifiers: NONE, kind: Press, state: NONE }))
06:29:51 [TRACE] (1) gitui::app: [src/app.rs:382] event: Input(Resize(60, 30))
06:29:52 [TRACE] (1) gitui::app: [src/app.rs:382] event: Input(Resize(59, 30))
06:29:52 [ERROR] panic: PanicInfo { payload: Any { .. }, message: Some(assertion failed: min <= max), location: Location { file: "/rustc/1.65.0/library/core/src/cmp.rs", line: 869, col: 9 }, can_unwind: true }
trace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: __libc_start_main
  17: <unknown>
EOF
@AnonymouX47 AnonymouX47 added the bug Something isn't working label Mar 4, 2023
@extrawurst
Copy link
Collaborator

duplicate of #1470

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