neovide: Freeze when deleting too many lines in a highlighted file when indent-blankline is installed

Describe the bug Selecting and deleting too many lines when indent-blankline is installed freezes neovide in an odd way. Pressing keys or the “X” on the window is logged, but nothing happens, resizing the windows causes some shifts in layout but not of the right sort.

To Reproduce Steps to reproduce the behavior:

  1. Install & configure indent-blankline
  2. Open a new buffer in neovide
  3. Paste a bunch of C code, like 1500 lines, I used https://raw.githubusercontent.com/qpakzk/linux-perf/e9f0dd7123612dbf3f5e4f48904117d4eaf27294/fs/dax.c
  4. :set filetype=c
  5. Visual select about 500 lines and delete them

Expected behavior Selected text is deleted.

Screenshots vidya instead

Desktop (please complete the following information):

  • OS: Windows 10
  • Neovide Version: 0.12
  • Neovim Version: 0.9.4 (it’s 0.9.2 in the vidya but I updated and it was exactly the same)

Please run neovide --log and paste the contents of the .log file created in the current directory here: neovide12_rCURRENT.log

Additional context

[16:13]fredizzimo: Can you try disabling indent-blankline? It keeps redefining the same highlights. And maybe causing a buffer overflow somewhere, the last message we get from Neovim seems to be partial
[16:13]Awpteamoose: can do
[16:15]Awpteamoose: that does fix it
[16:15]Awpteamoose: should I go complain to indent-blankline people?
[16:16]fredizzimo: I think it does something wrong, but there’s probably also another bug somewhere, either in Neovim or Neovide
-- snip --
[16:35]fredizzimo: After looking a bit closer at the log, there’s probably a buffer overflow in Neovim. Since it stops sending and the UI flush message is missing. And before that it sends many batches, trying to split the overelong message.

About this issue

  • Original URL
  • State: open
  • Created 6 months ago
  • Reactions: 2
  • Comments: 16 (5 by maintainers)

Most upvoted comments

The fix is now included in Neovim master and should be included in the next nightly build.

I won’t mark this issue as fixed though, since it will still freeze for a short while, when deleting the lines, but it should no longer totally hang.

@echasnovski The bug seems to be unique to ui clients that enable the ui extension ext_hlstate https://neovim.io/doc/user/ui.html#ui-hlstate

I think the actual bug is in Neovim, but something in the plugins trigger it. The only other information I have can be seen in the original log, it keeps sending hl_attr_define for the same highlight group, until the message apparently gets too big and neovim stops sending the rest. It’s already split into multiple messages, but that does not seem to be enough, and there’s no flush

Unfortunately, I wont have a development environment available for debugging this further until the end of the month, so this is probably all info I can give until then.

The original issue was reproduced by deleting roughly 500 lines