vscode-neovim: vscode-neovim becomes unresponsive but nvim did *not* crash/disconnect

To be clear: this is a separate issue from #2000 and similar, because no “neovim disconnected” errors is displayed but the extension otherwise stops working. There are many similar / duplicate issues about neovim 0.10.0 crashing, please see those for workarounds etc.


Ok, last night I was reproducing this more consistently, on both 0.9.5 and 0.10.0. Here are some of my notes about it, maybe they will help:

  • No error message / notification is displayed when the problem occurs. Most of the time I was simply stuck in normal mode and unable to move the cursor or change modes, etc.
    • In one case, I was stuck in macro-recording mode.
    • I have seen insert-mode before, but not typically
  • Keybinds become unresponsive, but the extension is still active (logging, etc.) and the neovim process is still running:
    0.0  0.4  0:51.00 │  ├─ /Users/ianchamberlain/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --type=utility --utility-sub-type=node.mojom.NodeService --lang=en-US --service-sandbox-type=none --dns-resu
    0.0  0.1  0:00.00 │  │  └─ /opt/homebrew/bin/nvim -N --embed --cmd source /Users/ianchamberlain/.vscode/extensions/asvetliakov.vscode-neovim-1.17.2/runtime/vscode-neovim.vim
    
  • Developer: Toggle Keyboard Shortcuts Troubleshooting showed it was still running vscode-neovim.send when pressing e.g. hjkl, so the context keys must have been set as for normal mode.

Extension logs (I believe the problem started around 2024-06-30T03:15:23.949Z): vscode-app-1719717602613.log

Reproduction steps that were working for me almost 100% of the time, but don’t seem to be working anymore. I’m not sure what changed, but this is basically what I had at the time:

  1. 10-15 tabs open total, including several :help tabs (external buffers)
  2. search for phrase in workspace using VSCode shortcut (<kbd>cmd+shift+f</kbd> on macOS) 3. click a search result that opens a new editor (buffer that was not previously open)
  3. click in the new editor
  4. Observe stuck cursor / unresponsive, run Neovim: Restart Extension to go back to step 1

I don’t have too many other clues yet, but maybe there’s something there that helps… I’ll keep trying to figure it out!

_Originally posted by @ian-h-chamberlain in https://github.com/vscode-neovim/vscode-neovim/issues/2131#issuecomment-2198786598_

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 12
  • Comments: 23 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed by https://github.com/neovim/neovim/pull/34412 in Nvim 0.12 (unreleased), and will be included in Nvim 0.11.3 maintenance release.

Before commenting or reporting this issue again, confirm that you are running the latest Nvim 0.12 or 0.11.3 nightly (not 0.11.2 or earlier), or if you built from source mention the exact commit sha.

@xiyaowong I hate to revive this thread after you just closed it, but this has been happening to me quite a bit lately. At least 2-3 times a day. I have Neovim: Restart Extension essentially pinned at the top of my command pallette. Anything I can do to help you repro?

It happened before I adopted kickstart.nvim, but here are my current neovim configs if they help: https://github.com/BenMcH/kickstart.nvim/

only after using the VSCode Github Copilot extension, e.g. the chat window or the inline copilot pop-up

That is tracked in https://github.com/vscode-neovim/vscode-neovim/issues/2184

The latest release v1.18.13 should help.

Just a guess, maybe #2242 is related? Could you try using the node-client from neovim/node-client#395 and see if that helps? Or if that’s not convenient, we can just update node-client and then try 😃

Interesting, I don’t think I ever saw any exception log like that when I was debugging this issue, but maybe the nature of the problem means they wouldn’t normally be shown in the vscode-neovim logs output pane anyway? In any case, having both #2230 and this change should make the extension more resilient to the problem — I’ll try to report back here after a while if I still see the requests hanging for a long time (which should be obvious by the new log I added).

@vlwkaos possibly! Do you see the same progress message I posted in my previous comment? I think I have occasionally experienced this getting stuck in “insert mode” although I’m not sure if the cursor was still visible in that case. I suppose if it happened while the mode was changing or something it could result in the kind of situation you’re describing, and the symptom sounds the same.

Have you noticed any other situations that seem to make it worse / better? Even with the steps I listed above it’s not super consistent for me, so it would be great if we could find a 100% reproduction scenario

Am I experiencing this as well?, mine stuck on normal mode (cursor shows), but works as insert (vscode own editor). At this point neovim is practically dead and I need to restart it.

Image

Still having the same issue. The logs didn’t show anything usefull

I’m on MacOs

This is #2407

@BenMcH Please confirm if your issue is similar to #2407. I haven’t encountered this issue recently.

Ok, now with the new progress messages I reproduced again! It seems to be stuck on this step:

Screenshot 2024-07-08 at 10 24 24

Looking at #2137 I’ll see if I can add some more logs/progress messages around those areas and get more details, but at least there’s a starting point for where to look now.

Re: reproducing on different devices, I’m not sure if it’s OS-dependent, but also anecdotally I tend to experience this more on my older Intel Mac for work than my personal M3 - but if it’s timing-related, that could just be due to stuff being slower or something, I suppose.