Summary
When editing a .slang file in VS Code, typing an incomplete import statement (just import with nothing after it) can crash the Slang Language Server (slangd) on Windows.
[Trace - 22:56:07] Sending request 'textDocument/inlayHint - (2)'.
Params: {
"textDocument": {
"uri": "path/Slangpy/Test/a.slang"
},
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 1,
"character": 7
}
}
}
[Trace - 22:56:07] Received request 'workspace/inlayHint/refresh - (0)'.
[Trace - 22:56:07] Sending response 'workspace/inlayHint/refresh - (0)'. Processing request took 0ms
No result returned.
[Error - 22:56:07] The Slang Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 22:56:07] Server process exited with code 3221225477.
This looks like a robustness bug in slangd’s incremental parsing / LSP request handling (e.g. documentSymbol, inlayHint) when encountering a syntactically incomplete import statement during editing.
Steps to Reproduce (Minimal)
- Open VS Code in an empty folder (new workspace).
- Create a new file: repro.slang
- Type exactly:
(i.e., the keyword import with no module/path/name after it)
4) Save the file (optional; crash may happen even without saving).
5) Observe the language server crashes immediately.