julia-vscode / LanguageServer.jl

An implementation of the Microsoft Language Server Protocol for the Julia language.
Other
364 stars 80 forks source link

Language server crashing #1226

Open zot opened 1 year ago

zot commented 1 year ago

I can't quite replicate this but I do have a stack trace -- maybe that will help. I'll try to catch it next time and see if I can replacate.

Here's the stack trace:

ERROR: BoundsError: attempt to access 3-element Vector{CSTParser.EXPR} at index [4]
Stacktrace:
  [1] getindex
    @ ./essentials.jl:13 [inlined]
  [2] _typed_vcat(x::CSTParser.EXPR, i::Int64)
    @ CSTParser.Iterating ~/.julia/packages/CSTParser/VcYj6/src/iterate.jl:723
  [3] _getindex(x::CSTParser.EXPR, i::Int64)
    @ CSTParser.Iterating ~/.julia/packages/CSTParser/VcYj6/src/iterate.jl:126
  [4] getindex(x::CSTParser.EXPR, i::Int64)
    @ CSTParser.Iterating ~/.julia/packages/CSTParser/VcYj6/src/iterate.jl:6
  [5] iterate
    @ ~/.julia/packages/CSTParser/VcYj6/src/iterate.jl:190 [inlined]
  [6] _rm_escaped_newlines(expr::CSTParser.EXPR)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/components/strings.jl:317
  [7] _rm_escaped_newlines(expr::CSTParser.EXPR)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/components/strings.jl:316
  [8] parse_string_or_cmd(ps::CSTParser.ParseState, prefixed::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/components/strings.jl:293
  [9] parse_string_or_cmd(ps::CSTParser.ParseState)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/components/strings.jl:25
 [10] mLITERAL(ps::CSTParser.ParseState)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/spec.jl:135
 [11] INSTANCE(ps::CSTParser.ParseState)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/spec.jl:230
 [12] parse_expression(ps::CSTParser.ParseState, esc_on_error::Bool; allow_const_field::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:73
 [13] parse_expression(ps::CSTParser.ParseState, esc_on_error::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:41
 [14] parse_expression(ps::CSTParser.ParseState)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:41
 [15] macro expansion
    @ ~/.julia/packages/CSTParser/VcYj6/src/utils.jl:123 [inlined]
 [16] parse_operator_eq(ps::CSTParser.ParseState, ret::CSTParser.EXPR, op::CSTParser.EXPR)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/components/operators.jl:275
 [17] parse_operator(ps::CSTParser.ParseState, ret::CSTParser.EXPR, op::CSTParser.EXPR)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/components/operators.jl:459
 [18] parse_compound(ps::CSTParser.ParseState, ret::CSTParser.EXPR)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:141
 [19] parse_compound_recur(ps::CSTParser.ParseState, ret::CSTParser.EXPR) (repeats 2 times)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:93
 [20] parse_expression(ps::CSTParser.ParseState, esc_on_error::Bool; allow_const_field::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:87
 [21] parse_expression(ps::CSTParser.ParseState, esc_on_error::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:41
 [22] parse_expression(ps::CSTParser.ParseState)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:41
 [23] parse_doc(ps::CSTParser.ParseState)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:220
 [24] parse(ps::CSTParser.ParseState, cont::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:248
 [25] parse(str::String, cont::Bool)
    @ CSTParser ~/.julia/packages/CSTParser/VcYj6/src/CSTParser.jl:199
 [26] textDocument_didChange_notification(params::LanguageServer.DidChangeTextDocumentParams, server::LanguageServerInstance, conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint})
    @ LanguageServer ~/.julia/packages/LanguageServer/0vsx2/src/requests/textdocument.jl:88
 [27] (::LanguageServer.var"#98#99"{typeof(LanguageServer.textDocument_didChange_notification), LanguageServerInstance})(conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::LanguageServer.DidChangeTextDocumentParams)
    @ LanguageServer ~/.julia/packages/LanguageServer/0vsx2/src/languageserverinstance.jl:262
 [28] dispatch_msg(x::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::JSONRPC.MsgDispatcher, msg::Dict{String, Any})
    @ JSONRPC ~/.julia/packages/JSONRPC/2NHNP/src/typed.jl:67
 [29] run(server::LanguageServerInstance)
    @ LanguageServer ~/.julia/packages/LanguageServer/0vsx2/src/languageserverinstance.jl:382
 [30] top-level scope
    @ none:1

Process julia-ls stderr finished
fyzycyst commented 1 year ago

Not sure if it's at all related, but I just came back from a few weeks doing other things... updated Julia to 1.9.2, VSCode did its update (1.80.2) & the Julia extension updated (1.47.2). After all this (and with the Julia extension as the only extension), I get what's included below. Apologies if this is a foolish user error...

[ Info: Starting the Julia Language Server ERROR: Endpoint is not running, the current state is closed. Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] check_dead_endpoint! @ c:\Users\p003227C.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\JSONRPC\src\core.jl:280 [inlined] [3] get_next_message(endpoint::JSONRPC.JSONRPCEndpoint{IOBuffer, Base.PipeEndpoint}) @ JSONRPC c:\Users\p003227C.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\JSONRPC\src\core.jl:212 [4] macro expansion @ c:\Users\p003227C.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\LanguageServer\src\languageserverinstance.jl:288 [inlined] [5] (::LanguageServer.var"#113#116"{LanguageServer.LanguageServerInstance})() @ LanguageServer .\task.jl:514 [ Info: Received new data from Julia Symbol Server. [ Info: Shutting down server instance. [ Info: Symbol server store is at 'c:\Users\p003227C\AppData\Roaming\Code\User\globalStorage\julialang.language-julia\symbolstorev5'. [ Info: Starting LS at 1691005489 [ Info: Received new data from Julia Symbol Server. Internal error: encountered unexpected error during compilation of getproperty: StackOverflowError() unknown function (ip: 00007ffc74144006) Internal error: encountered unexpected error during compilation of getproperty: StackOverflowError() unknown function (ip: 00007ffc74144006) Internal error: encountered unexpected error during compilation of getproperty: StackOverflowError() unknown function (ip: 00007ffc74144006) Internal error: encountered unexpected error during compilation of getproperty: StackOverflowError() .text$_ZN4llvm19raw_svector_ostream10write_implEPKcy at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm11raw_ostream5writeEPKcy at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_Z19write_unsigned_implIjEvRN4llvm11raw_ostreamET_yNS0_12IntegerStyleEb at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_Z14write_unsignedIyEvRN4llvm11raw_ostreamET_yNS0_12IntegerStyleEb at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm13write_integerERNS_11raw_ostreamEyyNS_12IntegerStyleE at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm11raw_ostreamlsEm at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm16ValueSymbolTable14makeUniqueNameEPNS_5ValueERNS_11SmallStringILj256EEE at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm16ValueSymbolTable15createValueNameENS_9StringRefEPNS_5ValueE at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm5Value11setNameImplERKNS_5TwineE at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) .text$_ZN4llvm5Value7setNameERKNS_5TwineE at C:\Users\p003227C\AppData\Local\Programs\Julia-1.9.2\bin\libLLVM-14jl.dll (unknown line) Internal error: encountered unexpected error during compilation of getproperty: StackOverflowError()

[EDIT: Forgot to mention, this is on my work machine running Win10Enterprise. Everything works just fine on my Mac (Intel) personal machine.]