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

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

Closed
zhruith opened this issue Dec 21, 2024 · 9 comments
Closed

Comments

@zhruith
Copy link

zhruith commented Dec 21, 2024

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' ]

@zhruith
Copy link
Author

zhruith commented Dec 21, 2024

@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

@zhruith
Copy link
Author

zhruith commented Dec 21, 2024

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

@fannheyward fannheyward added bug Something isn't working Can't reproduce and removed bug Something isn't working labels Dec 25, 2024
@fannheyward
Copy link
Member

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

Disable session.saveOnVimLeave and try again.

@zhruith
Copy link
Author

zhruith commented Dec 25, 2024

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

@zhruith
Copy link
Author

zhruith commented Dec 25, 2024

My config is here: https://github.com/zhruith/nvim

@zhruith
Copy link
Author

zhruith commented Dec 25, 2024

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

@fannheyward
Copy link
Member

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

Guess that nvim has some performance issues on Windows.

@zhruith
Copy link
Author

zhruith commented Dec 25, 2024

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

@zhruith
Copy link
Author

zhruith commented Dec 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@fannheyward @zhruith and others