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

assert(to_scroll >= 0) in msg_scroll_flush sometimes fails #21056

Open
ddickstein opened this issue Nov 14, 2022 · 13 comments
Open

assert(to_scroll >= 0) in msg_scroll_flush sometimes fails #21056

ddickstein opened this issue Nov 14, 2022 · 13 comments
Labels
bug-crash issue reporting a crash or segfault messages UI messages, log messages ui

Comments

@ddickstein
Copy link
Contributor

ddickstein commented Nov 14, 2022

Neovim version (nvim -v)

0.7.0

Vim (not Nvim) behaves the same?

N/A

Operating system/version

CentOS 7.9

Terminal name/version

xfce4-terminal 0.8.7.4

$TERM environment variable

tmux-256color

Installation

system package manager

How to reproduce the issue

This assertion sometimes fails. This should be able to reproduce it:

$ nvim --headless -u NONE -i /tmp/shada --cmd 'set shada+=%' -c q /tmp/crash.txt
$ false | nvim --headless --clean -i /tmp/shada --cmd 'set shada+=%' -c scriptnames -c q -

Expected behavior

Commands run without any problems

Actual behavior

The second command crashes with the following:

E575: Error while reading ShaDa file: buffer list at position 79 contains entry with invalid line number
  1: /usr/share/nvim/runtime/ftplugin.vim
  2: /usr/share/nvim/runtime/indent.vim
  3: /usr/share/nvim/runtime/filetype.lua
  4: /usr/share/nvim/runtime/filetype.vim
  5: /usr/share/nvim/runtime/syntax/syntax.vim
  6: /usr/share/nvim/runtime/syntax/synload.vim
  7: /usr/share/nvim/runtime/plugin/gzip.vim
  8: /usr/share/nvim/runtime/plugin/health.vim
  9: /usr/share/nvim/runtime/plugin/man.vim
 10: /usr/share/nvim/runtime/plugin/matchit.vim
 11: /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim
 12: /usr/share/nvim/runtime/plugin/matchparen.vim
 13: /usr/share/nvim/runtime/plugin/netrwPlugin.vim
 14: /usr/share/nvim/runtime/plugin/rplugin.vim
 15: /usr/share/nvim/runtime/plugin/shada.vim
 16: /usr/share/nvim/runtime/plugin/spellfile.vim
 17: /usr/share/nvim/runtime/plugin/tarPlugin.vim
 18: /usr/share/nvim/runtime/plugin/tohtml.vim
 19: /usr/share/nvim/runtime/plugin/tutor.vim
 20: /usr/share/nvim/runtime/plugin/zipPlugin.vim
 21: /usr/share/nvim/runtime/scripts.vimnvim: /path/to/src/nvim/message.c:2360: msg_scroll_flush: Assertion `to_scroll >= 0' failed.
Aborted (core dumped)
@ddickstein ddickstein added the bug issues reporting wrong behavior label Nov 14, 2022
@zeertzjq
Copy link
Member

v0.7.0 is too old. Can you try nightly appimage?

@zeertzjq zeertzjq added needs:response waiting for reply from the author ui bug-crash issue reporting a crash or segfault and removed bug issues reporting wrong behavior labels Nov 14, 2022
@ddickstein
Copy link
Contributor Author

Not able to build it yet on the machine where this crash happened. How long after a minor release (in semver terms) will the previous minor release be unsupported?

@zeertzjq
Copy link
Member

zeertzjq commented Dec 9, 2022

Does the appimage also not work on the machine?

@dundargoc dundargoc removed the needs:response waiting for reply from the author label Jan 1, 2023
@zeertzjq zeertzjq added the needs:response waiting for reply from the author label Jan 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

This issue has been closed since a request for information has not been answered for 30 days. It can be reopened when the requested information is provided.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2023
@ddickstein
Copy link
Contributor Author

Didn't test with appimage, but did test on my personal machine which runs 0.8.2 and was able to reproduce the problem as described, so I don't think it's been fixed since 0.7.0.

@github-actions github-actions bot removed the needs:response waiting for reply from the author label Feb 1, 2023
@zeertzjq
Copy link
Member

zeertzjq commented Feb 1, 2023

Did you test nightly version?

@ddickstein
Copy link
Contributor Author

No, but building nightly can't be a requirement for filing bug reports.

@zeertzjq
Copy link
Member

zeertzjq commented Feb 1, 2023

Can't you use the appimage?

@zeertzjq
Copy link
Member

zeertzjq commented Feb 2, 2023

Also try v0.8.3 when it is available

@ddickstein
Copy link
Contributor Author

Tested on the nightly appimage - v0.9.0-dev-867+gf9826e1df - problem is still present.

@zeertzjq zeertzjq reopened this Feb 3, 2023
@TechnicalDC
Copy link

I have also tested on the nightly - v0.10.0-dev-516+ga7e5d4238 - problem is still present. It happens randomly.

@zeertzjq zeertzjq added the messages UI messages, log messages label Jun 19, 2023
@arpangreat
Copy link

It's still happening on my side (version: v0.10.0-dev-567+g4dc86477b)

though it's not crashing without plugins

@domWalters
Copy link

I came across this bug today when porting my Neovim config to an Ubuntu 22.04 Virtual Machine.

System Info

Operating System

Ubuntu 22.04 in VirtualBox 7.0.10

Neovim

v0.9.1 installed via Snap

Terminals Used

  • Alacritty (v0.12.2) with tmux (v3.2a-4)
  • Gnome Terminal

Plugins

I could reliably trigger it when certain plugins were installed at the same time:

After running Neovim for the first time and downloading packages using packer.nvim, I would close and reopen it, and consistently get the to_scroll assertion error with both plugin pairs listed above.

Removing noice.nvim prevented me from triggering the assertion failure.

Removing the two plugins on the right and keeping noice.nvim still resulted in the assertion failure, so I must have had at least one other plugin that had a problem.

I think it's worth mentioning that I use this same Neovim config on an Arch machine, and don't have this issue (same Neovim and Alacritty versions; I also ran a packer.nvim update and it still works; I have not tried installing packages from fresh).

Possible Cause

I found the following two issues relating to noice.nvim:

I think it's worth pointing out this bit from the noice.nvim README as the possible culprit:

🔥 Status
Noice is using the new experimental vim.ui_attach API, so issues are to be expected. It is highly recommended to use Neovim nightly, since a bunch of issues have already been fixed upstream. Check this tracking issue for a list of known issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-crash issue reporting a crash or segfault messages UI messages, log messages ui
Projects
None yet
Development

No branches or pull requests

6 participants