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

bug: nvim crashing on Ubuntu - fixed by removing noice #588

Closed
3 tasks done
Mithrandir2k18 opened this issue Sep 6, 2023 · 7 comments · Fixed by #606 or #639
Closed
3 tasks done

bug: nvim crashing on Ubuntu - fixed by removing noice #588

Mithrandir2k18 opened this issue Sep 6, 2023 · 7 comments · Fixed by #606 or #639
Labels
bug Something isn't working

Comments

@Mithrandir2k18
Copy link

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.9.1

Operating system/version

Ubuntu 20.04, Linux mypc 5.11.0-42-generic #46~20.04.1-Ubuntu x86_64 GNU/Linux

Describe the bug

Full build info nvim --version NVIM v0.9.1 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/nvim/parts/nvim/build/.deps/usr/include/luajit-2.1 -I/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include -I/build/nvim/parts/nvim/build/build/cmake.config -I/build/nvim/parts/nvim/build/src -I/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Just recently added noice to my config and it has been working great on archlinux. I just now pulled my config to my Ubuntu 20.04 laptop and nvim would instantly crash after installing noice and then also at launch. It would only extremely briefly show this message (or print it out if I pipe neovims output to a file):

nvim: /build/nvim/parts/nvim/build/src/nvim/message.c:2418: msg_scroll_flush: Assertion to_scroll >= 0' failed.`

Removing noice from lazy fixes the issue, so I am pretty sure it is related. I run the default noice config

Steps To Reproduce

I was able to reproduce it within the latest ubuntu:20.04 docker image:

  1. `docker run -it ubuntu:20.04 bash
  2. Install latest neovim from unstable branch (as stable is v0.7): https://github.com/neovim/neovim/wiki/Installing-Neovim#ubuntu
  3. clone my dotfiles to $HOME/dotfiles and run $HOME/dotfiles/neovim/init
  4. run nvim. It should install all plugins, then crash. relaunching also crashes
  5. to get the error message on stdout run nvim > /dev/null, it'll crash and print out: nvim: /build/nvim/parts/nvim/build/src/nvim/message.c:2418: msg_scroll_flush: Assertion 'to_scroll >= 0' failed.

Expected Behavior

Run neovim normally, not crash instantly

Repro

I tried to narrow it down to a minimal init.lua, but sadly failed to reproduce it this way. It must therefore be my seemingly weird combination of plugins+running on Ubuntu 20.04, as I could not reproduce the issue on the debian:latest dockerimage, and also don't have this issue on my archlinux install at home.
@Mithrandir2k18 Mithrandir2k18 added the bug Something isn't working label Sep 6, 2023
@max397574
Copy link
Contributor

it would be really helpfull if you could try removing plugins and like this figure out which are needed to reproduce the issue

@Mithrandir2k18
Copy link
Author

Mithrandir2k18 commented Sep 6, 2023

it would be really helpfull if you could try removing plugins and like this figure out which are needed to reproduce the issue

I know, tried to do this a few times, but was unable to find the culprit. Since I'm at work currently, I just removed noice locally and will try to find the culprit again later. Maybe I'll write a script to automate it. I'm very sorry. I hoped that somebody could point me to a tool that helps me out there if I posted like this.

@max397574
Copy link
Contributor

well just comment out half of your plugins
if it then works comment out the other half because then the "breaking" plugin won't be in there
if it then doesn't work you continue to comment out half of the rest of the plugins
even with dozens of plugins you should be able to find it quite quickly like this

@MariaSolOs
Copy link
Contributor

@Mithrandir2k18 noice uses experimental, actively-being-developed features, and so you should really be using nightly Neovim. This might be an upstream issue that's already fixed.

@Mithrandir2k18
Copy link
Author

I am now on

$nvim --version
NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info

And the problematic plugin seems to be lsp-zero, at least deleting it solves the issue. I am on branch v1 but the same happens on v2 and v3 on my machine, so it seems there's an issue between these two plugins - but only on ubuntu 20.04 it seems, at least I don't have the issue on my other devices.

@folke
Copy link
Owner

folke commented Sep 20, 2023

Whenever Neovim crashes, it's a Neovim bug.
Make sure to use nightly for Noice since as @MariaSolOs said already, most of these bugs are likely already fixed upstream.

If you still have segfaults, then you need to get a proper stacktrace (see the Neovim wiki) and report an issue there with a minimal repro.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2023
@kierun
Copy link

kierun commented Oct 2, 2023

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

Successfully merging a pull request may close this issue.

5 participants