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

Starting nvim-0.10 in docker crashes tmux #28827

Open
joshuali925 opened this issue May 18, 2024 · 8 comments
Open

Starting nvim-0.10 in docker crashes tmux #28827

joshuali925 opened this issue May 18, 2024 · 8 comments
Labels
bug issues reporting wrong behavior environment user system environment (terminal, shell, tmux) status:blocked-external Needs a third-party / external change or fix tui
Milestone

Comments

@joshuali925
Copy link

Problem

Starting nvim inside docker inside tmux crashes tmux. This seems wezterm specific, trying on default Mac terminal it does not happen.

Steps to reproduce

  1. tmux (pre-installed version is 3.4)
  2. install docker
  3. docker run -it --rm ubuntu bash -c 'apt update; apt install -y wget; bash'
  4. in docker, run wget https://github.com/neovim/neovim/releases/download/v0.10.0/nvim-linux64.tar.gz; tar xzf nvim-linux64.tar.gz; ./nvim-linux64/bin/nvim
  5. see tmux crash with [server exited unexpectedly]

Expected behavior

same as 0.9.5 where it runs normally

Neovim version (nvim -v)

v0.10.0

Vim (not Nvim) behaves the same?

no, vim 9.1

Operating system/version

mac 13.6 ssh to Ubuntu 24.04 x64

Terminal name/version

wezterm 20240212-073805-217dfb30

$TERM environment variable

tmux-256color

Installation

tarball from github release

@joshuali925 joshuali925 added the bug issues reporting wrong behavior label May 18, 2024
@zeertzjq zeertzjq added environment user system environment (terminal, shell, tmux) tui labels May 18, 2024
@wookayin
Copy link
Member

Can you please attach tmux log if possible?

@zeertzjq
Copy link
Member

Hmm, according to tmux/tmux#3983 this seems to happen because DECRQSS conflicts with tmux's handling of sixel, while detecting tmux in Docker using environment variables does not work.

@joshuali925
Copy link
Author

tmux-logs.tar.gz

Also if i start tmux on Mac, then ssh and run nvim, tmux also crashes

@joshuali925
Copy link
Author

I can confirm rebuilding tmux from HEAD on master branch fixes it.

On tmux 3.4 (host) setting the TMUX environment variable (in docker) before opening nvim could prevent crashing tmux, but setting TERM=tmux-256color does not work. I also tried to comment out tui_query_extended_underline(tui); but tmux still crashes, so I'm not sure if it's this

bool tmux = terminfo_is_term_family(term, "tmux") || !!os_getenv("TMUX");

neovim/src/nvim/tui/tui.c

Lines 429 to 434 in 27fb629

// Don't use DECRQSS in screen or tmux, as they behave strangely when receiving it.
// Terminal.app also doesn't support DECRQSS.
if (tui->unibi_ext.set_underline_style == -1 && !(screen || tmux || nsterm)) {
// Query the terminal to see if it supports extended underline.
tui_query_extended_underline(tui);
}

@zeertzjq
Copy link
Member

There is another use of DECRQSS in runtime/lua/vim/_defaults.lua

@GNITOAHC
Copy link

I use iterm2 + tmux version 3.4 on MacOS.
When ssh to a Ubuntu 22.04.4 LTS with nvim v0.10.0 it crash my tmux, too.

@justinmk justinmk added the status:blocked-external Needs a third-party / external change or fix label May 21, 2024
@justinmk justinmk added this to the unplanned milestone May 21, 2024
@splooge
Copy link

splooge commented May 21, 2024

Similar issue

localhost$ tmux -V
tmux 3.4
localhost$ tmux -vvv
localhost$ ssh remotehost
remotehost$ nvim -v
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info
remotehost$ nvim --clean
[server exited unexpectedly]

tmux-logs.tar.gz

@fallenbeck
Copy link

fallenbeck commented May 22, 2024

There is a fix on the tmux side:
tmux/tmux#3983

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior environment user system environment (terminal, shell, tmux) status:blocked-external Needs a third-party / external change or fix tui
Projects
None yet
Development

No branches or pull requests

7 participants