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

get_offset crashed #768

Closed
davidanthoff opened this issue Jun 19, 2020 · 0 comments · Fixed by #807
Closed

get_offset crashed #768

davidanthoff opened this issue Jun 19, 2020 · 0 comments · Fixed by #807

Comments

@davidanthoff
Copy link
Member

From crash reporting.

Full error message there, not here, because it reveals too much about the client system.

Stack trace:

LanguageServer.LSOffsetError:
   at get_offset(::LanguageServer.Document, ::Int64, ::Int64) (./julialang.language-julia-0.16.7/scripts/packages/LanguageServer/src/document.jl93)
   at get_offset (./julialang.language-julia-0.16.7/scripts/packages/LanguageServer/src/document.jl96)
   at julia_getModuleAt_request(::LanguageServer.TextDocumentPositionParams, ::LanguageServerInstance, ::JSONRPC.JSONRPCEndpoint) (./julialang.language-julia-0.16.7/scripts/packages/LanguageServer/src/requests/features.jl305)
   at (::LanguageServer.var"#16#47"{LanguageServerInstance})(::JSONRPC.JSONRPCEndpoint, ::LanguageServer.TextDocumentPositionParams) (./julialang.language-julia-0.16.7/scripts/packages/LanguageServer/src/languageserverinstance.jl278)
   at dispatch_msg(::JSONRPC.JSONRPCEndpoint, ::JSONRPC.MsgDispatcher, ::Dict{String,Any}) (./julialang.language-julia-0.16.7/scripts/packages/JSONRPC/src/typed.jl63)
   at run(::LanguageServerInstance) (./julialang.language-julia-0.16.7/scripts/packages/LanguageServer/src/languageserverinstance.jl305)
   at top-level scope (./julialang.language-julia-0.16.7/scripts/languageserver/main.jl59)
   at include (boot.jl328)
   at include_relative(::Module, ::String) (loading.jl1105)
   at include(::Module, ::String) (Base.jl31)
   at exec_options(::Base.JLOptions) (client.jl287)
   at _start() (client.jl460)

This suggests that we are asking for an invalid position.

I can think of two explanations right now: a) we just have some simple bug in the client code, b) there are some tricky timing issues where for example the didChange notifications that are sent to the LS might get buffered while folks type, but on the client we get instant notifications when the selection changes, and then we are operating on different versions of the document. If the latter is the problem, we could probably add some diagnostics where we send the version field of the doc with the request, that would allow us to identify that problem in the server.

We should probably treat this bug as a fairly high priority one, this is the one that I saw relatively frequently in the insider build already, and where we said we would try to fix it quickly.

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

Successfully merging a pull request may close this issue.

1 participant