gdscript language server causes panic #7466
-
SummaryWhen helix connects to a godot 4 language server for the first time, it crashes. Starting helix again and connecting to the same language server works. Probably misbehaviour on the language server side, but perhaps helix should still be resilient enough here not to crash.
[language-server.gdscript]
command = "nc"
args = ["127.0.0.1", "6008"]
[[language]]
name = "gdscript"
language-servers = ["gdscript"] Reproduction StepsI tried this:
I expected this to happen: Instead, this happened: Helix log11:07:45 here onwards is from an actual crash, the part before was written after a successfull startup after a crash. ~/.cache/helix/helix.log
PlatformLinux Terminal Emulatorgnome-terminal Helix Version23.05-171-g6c6923c3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The gdscript language server is breaking the spec around initialization: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize
We send the The relevant lines of the logfile:
So this should be reported and fixed upstream. We can also handle this a little better on the client side by discarding the notification, I'll open a PR for that (edit: #7467). |
Beta Was this translation helpful? Give feedback.
The gdscript language server is breaking the spec around initialization: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize
We send the
initialize
request and before the server responds by sending the InitializeResult, it sends a textDocument/publishDiagnostics notification. We need the InitializeResult before publicDiagnostic because we need to know its position encoding to be able to translate the positions in the publicDiagnostic notification.The relevant lines of the logfile: