Open davidanthoff opened 4 years ago
another example, that is maybe even more telling:
get_offset crashed. More diagnostics:
line=0
character=1
position(io)=0
line_offsets='[0]'
text=''
And another one:
get_offset crashed. More diagnostics:
line=4
character=11
position(io)=0
line_offsets='[0]'
text=''
So my working assumption is that we fixed the text sync now because we haven't seen any crash reports from the didSave
test so far.
But these requests seem really odd, asking for something on line 4 in an empty doc?
Maybe we wait a little longer to see whether we do get some crash reports from didSave
, just to be sure?
I also asked over in the official repo about this case: https://github.com/microsoft/language-server-protocol/issues/946.
For now we're going to wait whether VS Code itself can add some checks to make sure we never receive invalid positions, details are tracked in microsoft/language-server-protocol#946.
Some info, working with Neovim:
Write some julia code:
function xxx()
end
Run `:w' to save to a file. Then add another function, but not written to file. Namely, the buffer in Neovim has
function xxx()
end
function yyy()
end
Then I ask Neovim to format the buffer (with the conform plugin, which will use julia-lsp), this error will occur.
Julia-lsp will read the code for yyy
from file, which does not exist!
Amend:
from the backtrace, textDocument_documentHighlight_request
triggered this error.
From [crash reporting]().
Error message:
Stack trace: