vscode-neovim: bug: Neovim Disconnected notebook/navigation (Nvim crash in `may_do_incsearch_highlighting`)

Check the following:

  • I have checked the behavior after setting “vscode-neovim.neovimClean” in VSCode settings.
  • I have read the vscode-neovim docs.
  • I have searched existing issues.

Neovim version (nvim -v)

NVIM v0.11.0-dev-442+g79002cf43, 0.9.5, 0.10.0

Operating system/version

MacOS 14.5

Describe the bug

Randomly while using vscode-neovim in a Jupyter notebook, I get neovim disconnects. The behavior exists on these combinations I’ve tried:

The only pairing where I don’t get crashes is vscode neovim v1.11.5 and neovim 0.9.5 so I’m stuck on old versions for now.

Here’s a log snippet showing the crash:

2024-07-17 15:14:09.820 [info] 
1 change; before #5  5 seconds ago
2024-07-17 15:14:10.583 [info] 
1 change; before #4  13 seconds ago
2024-07-17 15:14:17.719 [info] 
1 change; before #4  13 seconds ago
2024-07-17 15:15:01.403 [error] MainController: Neovim was disconnecte

I don’t think this is a duplicate of #2000 because I’m hitting the error on a wide variety of versions that solved the problem for other users.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 13
  • Comments: 18

Most upvoted comments

Facing nvim disconnected issue with vscode github pull request extension. With nvim v0.9.5 it works fine

I got a backtrace with v0.10.1. SIGSEGV happened during regex searching:

...
#18 0x0000558756b1033e in may_do_incsearch_highlighting ()

Since the trace mentions may_do_incsearch_highlighting, try disabling ‘incsearch’ (:set noincsearch). To avoid the nvim crash.

This crash should be reported to https://github.com/neovim/neovim/issues

Currently, the minimal example to reproduce the issue has not yet been found. Additionally, according to the Neovim documentation, the logic is valid. So for now, we can only look at how to reduce the occurrence of this issue.

Is there anything we have to do to fix this?

I have been having the same issue for a few weeks. I gave up and just kept relaunching vscode-neovim with ctrl/cmd+shift+P.

I notice it happens more often when scrolling through big notebooks (either scroll down or ctrl+enter to run and move to next). It also happens often on new cell creation.

I am using neovim v0.11dev and vscode-neovim v1.18.5. I also use often the remote-ssh plugin in VSCode, while the crashes happen.