-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
always crashes on resize #1551
Comments
Uh, that is pretty bad and should not happen. Thanks for reporting! What terminal emulator are you using? Crash location: zellij/zellij-server/src/screen.rs Line 490 in a7ddfe1
Either we are doing something strange or the terminal reports a size of 0 briefly? Don't know, just reads like it. |
Latest iTerm2 on Mac. |
I think we might have fixed this in 0.30.0 - could you try upgrading? |
Sorry, same behavior in 0.30.0. Here is an interesting clue:
I have to logout/in of that ssh session before zellij works again. |
After the first crash, can you run I can reproduce the same error message by running |
Nope, they're not zero: https://shot.3e.org/ss-20220630_173722.mp4 |
Mhh, even with my own reproducer with You could try something like |
Yes, zellij works after that command. |
Zellij seems to be getting a bad terminal window size report from the machine for some reason. We should handle it more gracefully, for sure. @dmd - could oy help us out by testing some cases? Could you issue
Thanks! |
I am still pretty sure a window size of zero is reported, just A better command is Also please try the |
Wow, ok. This turned out to be the result of a real weird very-special-to-my-situation setup that I'm sure doesn't apply to anyone else, so I think you don't need to worry about it at all. The long story is I forgot that my 'm' alias which connects to my server actually doesn't just call ssh directly, it calls an Expect script similar to this one which, in my case, basically says "are you on the VPN? if so, connect this way ... if not, connect that way." This expect script has a section in it that looked like this: trap {
set rows [system tput lines]
set cols [system tput cols]
stty rows $rows cols $cols < $spawn_out(slave,name)
} WINCH This has worked just fine for most purposes for years. Oddly, I have no idea how this could have ever worked, because rows and cols are actually getting set to the empty string! Yet, somehow, the results of But if I change So unless you want to dig deeper into this morass of weirdness, I think we're done here. |
Quite peculiar. I'm very curious how tmux works with this. Does it react properly to window changes? As in, expands or shrink to the window size? |
Yes, tmux responded properly even on my old possibly-broken version of the script. |
@raphCode - any guesses? Would be cool to gracefully just solve this problem when it happens. |
looks like tmux also falls back to defaults: |
Hum - nice... but then, how does the UI know the expand/shrink to the correct size? |
But for @dmd it does resize in this state |
no clue! I was more thinking of wether we should handle the case of rows/cols = 0 in a similar way by falling back to defaults, to avoid crashes? |
For sure! I just would also like us to be able to handle this as gracefully as tmux by just continuing to work :) |
On my end, stty 9.1 does not even accept this: $ stty rows '' cols ''
stty: invalid integer argument: ‘’
Nothing really conclusive, but some thoughts on how it is possible to recover the correct terminal size despite the tty set to zero columns / rows: There are sometimes window pixel sizes reported in addition to the terminal size in characters: The |
Is zellij supposed to do something reasonable if you resize the terminal? I find that it always, 100% of the time, crashes if you resize the terminal.
Basic information
zellij --version
:0.29.1uname -av
orver
(Windows): Linux micc 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: