neoclide/coc.nvim

Switching sessions multiple times will cause nvim to be in a suspended state

Closed this issue · 9 comments

Switching session multiple times(two or more, random), when exit nvim will cause nvim to be in a suspended state, can't exit. have to close the terminal.
Test platform: windows 11 and wsl(Ubuntu) both.
Switch command: CocCommand session.load

cocinfo:

versions

vim version: NVIM v0.10.2
node version: v23.4.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: C:\Users\zhrui.vim\plugged\coc.nvim
term: xterm-256color
platform: win32

Log of coc.nvim

2024-12-21T19:13:28.548 WARN (pid:12436) [workspace] - Extension "coc-lists" registered synchronized autocmd "VimLeavePre", which could be slow.
2024-12-21T19:13:28.575 INFO (pid:12436) [plugin] - coc.nvim initialized with node: v23.4.0 after 185
2024-12-21T19:13:30.731 INFO (pid:12436) [attach] - receive notification: openList [ 'commands' ]
2024-12-21T19:13:32.744 INFO (pid:12436) [attach] - receive notification: openList [ 'vimcommands' ]

@wwqwq2313 I change the coc#rpc#stop() function as your direction commit, but it's still not working for me. suspended state when :exit nvim

And sometimes got this error when load session:
[coc.nvim]: UnhandledRejection: transport disconnected
Error: request error on "nvim_eval" - transport disconnected at MruList._addRecentFile (C:\Users\zhrui\AppData\Local\coc\extensions\node_modules\coc-lists\lib\index.js:3606:35) at C:\Users\zhrui\AppData\Local\coc\extensions\node_modules\coc-lists\lib\index.js:3590:19

Can't reproduce on macOS and Linux, looks like the nvim instance on WSL slow to respond.

Disable session.saveOnVimLeave and try again.

Disable session.saveOnVimLeave still been suspended when exit.
Switch two session is ok, three and more will suspend.

If have two session switch in cycle for three times, will suspend again.

Try minimal vimrc, only coc.nvim + coc-lists.

Guess that nvim has some performance issues on Windows.

Oh yeah, is working now. just have lazy.nvim and coc.nvim. thanks for your help.

The reason is 'lewis6991/gitsigns.nvim', disabled it will working well.