elixir-lsp / vscode-elixir-ls

Elixir language support and debugger for VS Code, powered by ElixirLS.
https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls
MIT License
539 stars 106 forks source link

VSCode stops LS after completion on OTP 26 Windows #391

Closed mrtkp9993 closed 9 months ago

mrtkp9993 commented 11 months ago

After typing & character, language-server is crashing.

Environment

Elixir 1.15.7 (compiled with Erlang/OTP 26)

Crash report

  1. ElixirLS output:

    [Error - 5:13:46 PM] Stopping server failed
    Error: Stopping the server timed out
    at c:\Users\murat\.vscode\extensions\jakebecker.elixir-ls-0.17.6\out\extension.js:89:9067
  2. Developer tools errors:

    notificationsAlerts.ts:42 Client ElixirLS - elixir_gen_alg: connection to server is erroring. Shutting down server.
    c @ notificationsAlerts.ts:42
    log.ts:441   ERR Model is disposed!: Error: Model is disposed!
    at W.ib (vscode-file://vscode-app/c:/Users/murat/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:728:263)
    at W.getLineCount (vscode-file://vscode-app/c:/Users/murat/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:730:4302)
    at vscode-file://vscode-app/c:/Users/murat/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1657:31631
lukaszsamson commented 11 months ago
Screenshot 2023-11-05 at 16 27 55

I cannot reproduce that. Please share a repo that reproduces the crash. Please attach logs from Output tab https://github.com/elixir-lsp/vscode-elixir-ls#check-elixirls-output

mrtkp9993 commented 11 months ago

It clears Output tab automatically. This is the last output after clearing:

[Error - 6:34:15 PM] Stopping server failed
Error: Stopping the server timed out
    at c:\Users\murat\.vscode\extensions\jakebecker.elixir-ls-0.17.6\out\extension.js:89:9067

Recording 2023-11-05 at 18 34 35

lukaszsamson commented 11 months ago

Still cannot reproduce. Please provide more details

Screenshot 2023-11-05 at 23 55 11

01">

infinityfye commented 11 months ago

I can confirm a similar behaviour. The only difference in the environment is I'm using ElixirLS v0.17.7 even the windows version is the same. This happens ONLY on windows, it doesn't happen when running vscode in wsl for example.

For me the LS crashes when typing a map or a struct. To be precise it crashes when typing any character after %. If I restart the LS in the middle of the map and finish it it works normally.

I couldn't recreate this behaviour on the & character, however.

lukaszsamson commented 11 months ago

Please downgrade to OTP 25. See details in https://github.com/elixir-lsp/elixir-ls/issues/1023 and OTP bug report https://github.com/erlang/otp/issues/7838

lukaszsamson commented 9 months ago

OTP 26.2.1 is out and with with fix for this issue