fsharp-language-server icon indicating copy to clipboard operation
fsharp-language-server copied to clipboard

F# Language Server crashed 5 times in the last 3 minutes

Open dustinmoris opened this issue 6 years ago • 8 comments

Hi,

I installed this extension to test it on one of my projects but after opening my project in VSCode the F# Language Server crashed almost immediately and keeps crashing when I restart VSCode.

The message is:

...
  LoadTime: 02/06/2019 19:13:21
  ExtraProjectInfo: <null>
  IsIncompleteTypeCheckEnvironment: false
  OriginalLoadReferences: []
  ExtraProjectInfo: <null>
  Stamp: <null>
  UnresolvedReferences: <null>
  UseScriptResolutionRules: false
Checked Core.fs in 6398ms
Found 0 unused declarations in 74ms
[Trace - 9:34:13 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///Users/<redacted>/GitHub/<redacted>/src/<redacted>/Domain/Core.fs",
    "diagnostics": []
}


Process is terminating due to StackOverflowException.
[Error - 9:34:13 AM] Connection to server got closed. Server will not be restarted.

Looking through the logs, it seems that it picked up the Core.fs file of my project first, then was scanning for projects which reference this file and started to crack open the one .fsproj which has this file.

I notice many conflicts during dependency resolution which are like this:

Conflict between [("/Users/<redacted>/.nuget/packages/system.collections/4.3.0/ref/netstandard1.3/System.Collections.dll",
  "System.Collections", 4.0.10.0);
 ("/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.dll",
  "System.Collections", 4.1.1.0)], chose /usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.dll

dustinmoris avatar Feb 09 '19 09:02 dustinmoris

Those conflict messages are normal, .net project rules are very complicated and we have to rely on heuristics to resolve ambiguities. Those conflict warnings are logging the choices we're making.

If you could make a minimal example that reproduces the problem, that would help diagnose. As it is, it's hard to tell what caused the crash---everything up to Process is terminating due to StackOverflowException. looks normal.

georgewfraser avatar Feb 09 '19 20:02 georgewfraser

If you could make a minimal example that reproduces the problem, that would help diagnose.

Sorry for the late response. Thanks for getting back and I'll try to see if I can reproduce it with a much smaller application by slowly removing files. I'll post it here when I have something for you to look at.

Also I think #45 might be related.

dustinmoris avatar Feb 13 '19 15:02 dustinmoris

Having the same trouble. Not really even sure how to get diagnostics, the VSCode command to show logs is also bombing out.

floyd-may avatar Dec 31 '20 19:12 floyd-may

Faced this problem too. By default Ionide installs version 5.xx. Solved by installing previous one (4.17)

WhiteSharq avatar Jan 06 '21 18:01 WhiteSharq

@WhiteSharq note that this repo is not the Ionide repo. Any notes about it should go to Ionide/ionide-vscode-fsharp.

baronfel avatar Jan 06 '21 18:01 baronfel

If helps anyone, I had this problem after cloning the SAFE dojo repo. I just opened vscode in a child folder, I wasn't at the root of the project.

alarbada avatar Feb 25 '21 23:02 alarbada

It's been a year since this is not fixed. I've tried everything mentioned in this repo and github.com/ionide/ionide-vscode-fsharp and this message about the server crashing is still there.

ladaltamirano avatar Apr 24 '22 00:04 ladaltamirano

It's probably Ionide failing, not this project. Please direct all ire over onto the Ionide repo.

baronfel avatar Apr 24 '22 00:04 baronfel