ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
850 stars 276 forks source link

Unrecoverable crashes when editing file containing long identifiers #1956

Open nkosi23 opened 8 months ago

nkosi23 commented 8 months ago

Describe the bug

When I edit a file containing relatively long identifiers such as:

let ``order-confirmation | Thank you for your interest in our product. In order to confirm your registration, please review the details below and send your payment using the details attached to this email.`` = "some-localized-string"

After a couple of minutes or seconds of interacting with intellisense, the F# language server crashes and it is not possible to just restart it using vscode's command panel. The only way to recover is to close and restart vscode entirely. The debug logs show the following error repeated every time an action attempts to start the server:

Error: Starting server failed
    at _.$start (/home/someuser/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:235530)
    at async _.sendRequest (/home/someuser/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:220543)
    at async h.provideHover (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:40339)
[Error - 13:00:01] Request textDocument/hover failed.

...
Error: Starting server failed
    at _.$start (/home/reddy/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:235530)
    at async _.sendRequest (/home/reddy/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:220543)
    at async i (/home/reddy/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:315628)
    at async H.provideInlayHints (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:56138)
[Error - 13:00:03] Request textDocument/inlayHint failed.

Error: Starting server failed
    at _.$start (/home/reddy/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:235530)
    at async _.sendRequest (/home/reddy/.vscode/extensions/ionide.ionide-fsharp-7.15.2/fsharp.js:2:220543)
    at async i.provideCodeLenses (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:38624)
[Error - 13:05:24] Sending request textDocument/codeLens failed.

Steps to reproduce

  1. Create an F# module containing a values bound to long identifiers (for example 3 or 4 values having long identifiers, and 3 or 4 values bound to relatively small ones)
  2. Use intellisense as part of code edition (completion, hover to see typing details about variables with long identifiers etc...)

I have not been able to identify the exact action triggering the crash, but reproducing it is not difficult. I have just reproduced it immediately after starting vscode just by hovering code.

Link to sample reproduction

Expected behaviour

Screenshots

Machine info

Additional context

Add any other context about the problem here.