-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
error attempt to get length of local 'prev_line' #24972
Comments
Please fill out the template correctly; those fields are there for a reason. (For example, where did you get the nightly from? And why does the version then claim We also need at least some context to be able to debug this: What server? What file? How do you start the server (plugins?)... |
Hmm, fixed. Is it OK now? |
Sorry, no, that's not nearly enough for us to go on. |
I don't think I know any more useful details. Is the LSP log useful? I am not sure I know in what time this has happened. Anything else? |
The point is to create a minimal(!) config and example that somebody else can try at home. (Server == LSP server; there's multiple for python.) First step would be to remove copilot from the equation. |
Running into this as well.
:version system vimrc file: "$VIM/sysinit.vim"
Found these messages in LSP log:
Gets triggered every time I write a Rust file. This seems to be accompanied by this error in LSP Log as well:
Restarting the editor fixes the problem. |
I have the same problem on neovim 0.9.1 from homebrew, with lspconfig, coc-clangd. It happens seemingly all the time, whenever I edit the current buffer, switch to a new one and then edit in that. Specifically, editing inside a C++ function argument list seems to trigger this problem, not every edit otherwise.
The error happens as soon as I include this code in
(I'm using dein package manager) |
In my case, I could narrow it down to the presence or absence of this block:
when included, the error occurs. When not included, no problem. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Possibly related #16259 |
The problem with DAP has been fixed by #28260 |
I wrote a simple keylogging plugin in hopes of getting more context next time I hit this bug: https://github.com/icholy/keylog.nvim @themightyoarfish @monopoly-db how frequently do you hit this issue? I'm only getting it once every 2 weeks recently. If it's frequent, can you share more details about your setups/configurations? |
I have not ever had this after removing the config block i wrote above, but i think it occurred often, daily at least. |
i think this happens to me whenever i suspend neovim and update the files outside the editor. for instance, via changing git branches, or doing a rebase. when i resume neovim, this is triggered. but i haven't had a chance to get down to reproducible test case |
This makes sense. I'm not able to reproduce it reliably, but I think it also happened when running formatters or other commands that modify the files (e.g. |
@igor47 I've managed to reproduce it consistently by stopping the $ ps aux | grep nvim | grep embed
icholy 181496 1.2 0.0 28640 21772 ? Ssl 16:14 0:00 nvim --embed
$ kill -s STOP 181496
$ # modify file
$ kill -s CONT 181496 |
This comment was marked as outdated.
This comment was marked as outdated.
definitely not easy to get a repro, but it's a big issue for me. i end up restarting neovim all the time, which gets me out of flow and loses my context of open buffers and cursor positions and tabs. pretty annoying. here's a repro using my neovim config, on the latest neovim and with all plugins recently updated. managed to trigger it by echoing into the buffer from outside neovim, but the behavior is very inconsistent -- sometimes, neovim will prompt me to reload the file. sometimes it will just reload it. and sometimes, it'll go into crash mode. you can see me restarting lsp, which doesn't fix it but somehow editing a different part of the file does fix it? sometimes i can fix it by lspcrash.webm
|
ok here's a minimal repro: https://github.com/igor47/nvimbug i'm using only a very minimal set of plugins -- mason and lspconfig , with lazy to install them. seems to repro pretty reliably: |
I can consistently get a de-sync with the following repro. https://github.com/icholy/nvim-lsp-bug-3 I was doing some more experimenting and found the following:
I created a much smaller repro with the dummy LSP: https://github.com/icholy/nvim-lsp-bug-3/tree/dummylsp Config: local gopls = vim.lsp.start_client({ name = "gopls", cmd = { "gopls", "serve" } })
local dummy = vim.lsp.start_client({ name = "dummy", cmd = { "dummylsp" } })
vim.api.nvim_create_autocmd("FileType", {
pattern = { "go" },
callback = function()
vim.lsp.buf_attach_client(0, gopls)
vim.lsp.buf_attach_client(0, dummy)
end
}) Steps:
|
If anyone here is able to test #28721 that would be appreciated. edit: I've been using my fork as my daily driver for a week and have no issues. |
@icholy I was able to consistently reproduce this issue when resolving conflicts during a git rebase with conflict-marker.vim.
The issue was gone after applying your patch. Thank you! |
Problem
Sometimes lsp client hangs and get
The file is python file. I use lsp_config and nvim-lsp-installer with copilot , null-ls , pyright, pylsp as lsp clients. I don't know which failed.
I got this message constantly when writing a line (on every char). It got OK eventually.
Steps to reproduce
Unkown
Expected behavior
This shouldn't happen
Neovim version (nvim -v)
NVIM v0.9.1 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1 -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDE_GENERATED_DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include system vimrc file: "$VIM\sysinit.vim" fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim" Run :checkhealth for more info
Vim (not Nvim) behaves the same?
didnt try
Operating system/version
windows
Terminal name/version
nvim-qt
$TERM environment variable
''
Installation
stable probably
The text was updated successfully, but these errors were encountered: