razzmatazz / csharp-language-server

Roslyn-based LSP language server for C#
MIT License
600 stars 38 forks source link

Crashes on lsp-mode with version 0.5.4 #44

Closed joefbsjr closed 2 years ago

joefbsjr commented 2 years ago

After updating to 0.5.4 csharp-ls crashes not long after initialization.

I don't know where to get a log, so if you need one please tell me where I can find it. The only error I get in stderr is Process csharp-ls stderr<1> finished

It crashes while moving the cursor, so my suspicion are either highlight or documentation.

razzmatazz commented 2 years ago

hey; I am tripping on this as well, debugging why -- will release a new version asap

joefbsjr commented 2 years ago

Let me know if I can help.

razzmatazz commented 2 years ago

the cause is apparently this:

I am just trying to find a a way to avoid reverting this on the upstream and just fix csharp-ls with try/with in right places :)

razzmatazz commented 2 years ago

I have added this commit: 06411285b76b46d2fc4b9f8e30e510354dd528e7 but not 100% that fixes it all

razzmatazz commented 2 years ago

@joefbsjr if you could test if the fix works for you then it would be really nice

because it does not hit it for me at once, it takes some incantation of requests to trigger the crash.. for some reason, so I am reluctant to declare victory yet :)

joefbsjr commented 2 years ago

Sure. Will try later today.

razzmatazz commented 2 years ago

uh.. actually the error seems to be in upstream Ionide.LSP -- it marks LocalRpcException as fatal, but at the same time it uses it to report "error" lsp results.. ok, attempt no 2 at fixing this

razzmatazz commented 2 years ago

lets see if https://github.com/razzmatazz/csharp-language-server/commit/abdc323156f30931a9d17990a983532c37f8f4d4 helps

razzmatazz commented 2 years ago

Upstream Ionide.LSP PR:

razzmatazz commented 2 years ago

0.5.5 released that should fix this (I very much hope so):

razzmatazz commented 2 years ago

Closing, @joefbsjr please reopen if this occurs again