Neovim freeze on last tab quitting

I’ve been using neovim for a couple years, and have had good experiences customizing it to my liking and debugging issues as they arise. This latest one has me stymied, however.

Neovim will freeze when the final window is exited with either :q :q! or :qa! The same result occurs if I run it as-

nvim -U NORC

Which interestingly still loaded my config. It was evident because my Airline theme was visible. So I renamed my config file and retested with no config and the result is the same. I then tested nvim outside of X11 on the tty and the result is the same- frozen. I even tried reinstalling it although I figured that wouldn’t make a difference.

If I have multiple tabs or windows within neovim, I can exit each of them without problem until the final window. I tried running it with -V10nvim.log I scanned the log but saw no useful messages. I do not think I can attach it here.

So neovim with no config run on the tty even after a reinstall. I cannot think of another way to reduce the variables to a known, working state. Any ideas on how to further debug? System info is below, and please let me know if any further info will help.

By “frozen” I mean the cursor returns to the first column of the line, nvim remains in the terminal, and no known combination of keypresses will change it’s state.

┗╸❯❯❯ nvim -v     
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.4/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

┗╸❯❯❯ uname -r            
5.12.9-arch1-1

1 Like

I think the ‘u’ should be lowercase, i.e. nvim -u NORC.

Good catch, using the lower case argument let neovim ignore my config. Unfortunately, it did not resolve the issue.

If it hangs even without your config, the next step would be to try
neovim nightly, if you’re lucky your problem has already been fixed :slight_smile:

Good idea to try nightly, thanks. I did, with no config, and it still hangs. So weird, In case it matters, vim can quit without issue.

I found an interesting exception, however! I used nvim with the super user and almost didn’t notice that it actually exited. So I created a test regular user and discovered exiting works for that regular user too. So it is just my user that fails to quit. So this is sounding less like a neovim issue, but I’ll leave this open for a day in case someone has a suggestion. But my user can’t exit neovim even if at the tty and using -u NORC. I figured that’d limit any unique configuration of my user to essentially nil as far as nvim is concerned but apparently not.

Can anyone think of what to check next to debug this?

Thanks

The big guns would be to attach GDB to neovim and to get a backtrace,
trying to understand where and why it hangs.

But I have a feeling that the problem is that you have plugins and that
they’re still being loaded. I’d try to move ~/.config/nvim to /tmp
and see if neovim still hangs.

If it does, then I’d blahe your .bashrc/.zshrc, and would try to
reproduce in another shell.

If that still hanged, I’d try another terminal too.