-
-
Notifications
You must be signed in to change notification settings - Fork 247
fix: invalid buffer is on diagnostic reset #779
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
fix: invalid buffer is on diagnostic reset #779
Conversation
Continually run into the following error when restarting a debugging
session:
```
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: Invalid buffer id: 22
stack traceback:
[C]: in function 'nvim_exec_autocmds'
/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: in function 'reset'
/home/louis/.config/nvim/after/nvim-dap/lua/dap/session.lua:1399: in function 'close'
/home/louis/.config/nvim/after/nvim-dap/lua/dap/session.lua:703: in function 'callback'
/home/louis/.config/nvim/after/nvim-dap/lua/dap/session.lua:958: in function </home/louis/.config/nvim/after/nvim-dap/lua/dap/session.lua:950>
```
Swapping the session close and the reset of the namespace in session.lua
seems to fix the issue.
Signed-off-by: Louis DeLosSantos <[email protected]>
|
Thanks |
|
Was this fixed? Im still getting the same error on restarting debugging session with the latest commit |
|
Sadly, I dont think this fixed it. The problem seems so intermittent for me that I just didn't see it for awhile after the change. But I ran into it again yesterday. |
|
I didn't really understand why it would fix the error, but seemed harmless enough to merge :) I never saw this error myself and don't quite understand how it can happen. Some reproduction steps would be nice. This might even be a bug in neovim as I don't think |
|
Just to be sure. You're both on neovim 0.8.1 stable, or later? There were some fixes in Neovim related to handling buffer wipeout in the diagnostic code |
|
Yup nvim-0.9.0. |
|
Looks like this is an issue with neovim not always clearing the internal diagnostic cache: neovim/neovim#21454 |
|
Should the nvim-dap code get wrapped in |
That thought crossed my mind as well, but once there are stale diagnostic entries other operations can fail too. E.g. if you're trying to use The error should only happen if the I have no idea why that would happen in your setups. |
Continually run into the following error when restarting a debugging session:
Swapping the session close and the reset of the namespace in session.lua seems to fix the issue.
Signed-off-by: Louis DeLosSantos [email protected]