Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hex code '\a0' crashes language server #661

Open
ManuelHentschel opened this issue Mar 25, 2024 · 1 comment
Open

Hex code '\a0' crashes language server #661

ManuelHentschel opened this issue Mar 25, 2024 · 1 comment

Comments

@ManuelHentschel
Copy link
Member

Setup:

  • windows 10
  • vscode v1.87.2
  • R v4.3.3
  • languageserver v0.3.16 (installed from GitHub)

Workspace containing a single file named "test.R" with content:

'\xa0'

Error:
Having this file open and reloading the vscode windows produces the following Error messages:
"Connection to server got closed. Server will not be restarted." (Source: R)
"Client R Language Server: connection to server is erroring. read ECONNRESET" (Source: R)

R Language Server output channel contains:

R Language Server (11948) started
R library paths: C:/Users/Manuel/AppData/Local/R/win-library/4.3
C:/Program Files/R/R-4.3.3/library

[2024-03-25 10:19:25.933] Error: file name conversion problem -- name too long?
Call: file.exists(str_texts)
Stack trace:
1: file.exists(str_texts)
2: with_wd(rootPath, file.exists(str_texts) & !dir.exists(str_texts))
3: document_link_reply(id, uri, self$workspace, document, rootPath)
4: handler(self, item$id, item$params)
5: parse_callback(self, uri, version, result)
6: private$callback(result)
7: task$check()
8: self$parse_task_manager$check_tasks()
9: self$process_events()

[2024-03-25 10:19:25.935] exiting

[Error - 10:19:25 AM] Client R Language Server: connection to server is erroring.
read ECONNRESET
[Error - 10:19:25 AM] Client R Language Server: connection to server is erroring.
read ECONNRESET
[Error - 10:19:25 AM] Connection to server got closed. Server will not be restarted.
R Language Server (11948) exited with exit code nul

Notes:
I could not reproduce using wsl.
The file name does not seem to be the issue, the error does not occur with different file contents.
If I start with an empty file and add the text '\xa0', the languageserver usually does not crash and features like Go to Definition work on the following:

s <- '\xa0'

s
@ElijahElliotP
Copy link

I'm getting the same (or only similar error, but with a different cause:
image

[2024-07-22 11:49:52.050] Error: cannot change working directory
Call: setwd(wd)
Stack trace:
1: setwd(wd)
2: with_wd(rootPath, file.exists(str_texts) & !dir.exists(str_texts))
3: document_link_reply(id, uri, self$workspace, document, rootPath)
4: handler(self, item$id, item$params)
5: parse_callback(self, uri, version, result)
6: private$callback(result)
7: task$check()
8: self$parse_task_manager$check_tasks()
9: self$process_events()
[2024-07-22 11:49:52.053] exiting

[Error - 11:49:53 AM] Client R Language Server: connection to server is erroring.
read ECONNRESET
[Error - 11:49:53 AM] Client R Language Server: connection to server is erroring.
read ECONNRESET
[Error - 11:49:53 AM] Connection to server got closed. Server will not be restarted.
R Language Server (5788) exited with exit code null

From the second step of the stack trace onwards, it's almost identical.

VSCode About:

Version: 1.90.2 (system setup)
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:34:26.404Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.19045

I hope there's something to be done? Any help appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants