MikhailArkhipov / vscode-r

R Tools for VS Code
Other
82 stars 6 forks source link

Report a load error #59

Closed psychelzh closed 3 years ago

psychelzh commented 3 years ago

The following are messages:

[Info  - 下午4:40:55] Starting R Process with C:\Program Files\R\R-4.0.4...
[Info  - 下午4:41:00] complete in 00:05:119
[Info  - 下午4:41:00] Building IntelliSense index...
[Info  - 下午4:41:08] complete in 00:08:176
Unhandled exception. System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Microsoft.R.LanguageServer.Threading.MainThread.MainThreadAwaiter.OnCompleted(Action continuation)
   at Microsoft.Common.Core.Threading.MainThreadAwaiter.OnCompleted(Action continuation)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AwaitOnCompleted[TAwaiter,TStateMachine](TAwaiter& awaiter, TStateMachine& stateMachine, Task`1& taskField)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info  - 下午4:15:16] Connection to server got closed. Server will restart.
[Error - 下午4:15:17] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
    at Object.dispose (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\connection.js:1044:27)
    at Object.dispose (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\common\client.js:73:35)
    at LanguageClient.handleConnectionClosed (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\common\client.js:2424:42)
    at LanguageClient.handleConnectionClosed (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\node\main.js:155:15)
    at closeHandler (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\common\client.js:2411:18)
    at CallbackList.invoke (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:55:39)
    at Emitter.fire (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:117:36)
    at closeHandler (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\connection.js:256:26)
    at CallbackList.invoke (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:55:39)
    at Emitter.fire (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:117:36)
    at StreamMessageWriter.fireClose (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\messageWriter.js:42:27)
    at Socket.<anonymous> (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\messageWriter.js:75:42)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at Pipe.<anonymous> (net.js:674:12)
MikhailArkhipov commented 3 years ago

Looks like https://github.com/MikhailArkhipov/vscode-r/issues/54 which was reported fixed... I guess something else is still problematic.

psychelzh commented 3 years ago

I do not know whether it is solved. It occasionally appears, but there is no error today. My version is "v0.0.20".

psychelzh commented 3 years ago

Interestingly, errored for a little while but succeeded then.

[Info  - 下午3:52:08] Available R interpreters:
[Info  - 下午3:52:08]     [0] R 4.0.4
[Info  - 下午3:52:08] You can specify the desired interpreter index in the R settings
[Info  - 下午3:52:08] or provide path to R using `r.interpreterPath` setting.
[Info  - 下午3:52:08] Selected interpreter: [0] R 4.0.4.

[Info  - 下午3:52:08] Starting R Process with C:\Program Files\R\R-4.0.4...
[Info  - 下午3:52:16] complete in 00:08:242
[Info  - 下午3:52:16] Building IntelliSense index...
[Info  - 下午3:54:07] complete in 01:50:821
Unhandled exception. System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Microsoft.R.LanguageServer.Threading.MainThread.MainThreadAwaiter.OnCompleted(Action continuation)
   at Microsoft.Common.Core.Threading.MainThreadAwaiter.OnCompleted(Action continuation)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AwaitOnCompleted[TAwaiter,TStateMachine](TAwaiter& awaiter, TStateMachine& stateMachine, Task`1& taskField)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info  - 下午4:00:09] Connection to server got closed. Server will restart.
[Error - 下午4:00:09] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
    at Object.dispose (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\connection.js:1044:27)
    at Object.dispose (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\common\client.js:73:35)
    at LanguageClient.handleConnectionClosed (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\common\client.js:2424:42)
    at LanguageClient.handleConnectionClosed (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\node\main.js:155:15)
    at closeHandler (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-languageclient\lib\common\client.js:2411:18)
    at CallbackList.invoke (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:55:39)
    at Emitter.fire (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:117:36)
    at closeHandler (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\connection.js:256:26)
    at CallbackList.invoke (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:55:39)
    at Emitter.fire (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\events.js:117:36)
    at StreamMessageWriter.fireClose (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\messageWriter.js:42:27)
    at Socket.<anonymous> (c:\Users\liang\.vscode\extensions\mikhail-arkhipov.r-0.0.20\node_modules\vscode-jsonrpc\lib\common\messageWriter.js:75:42)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at Pipe.<anonymous> (net.js:674:12)
[Info  - 下午4:00:10] Available R interpreters:
[Info  - 下午4:00:10]     [0] R 4.0.4
[Info  - 下午4:00:10] You can specify the desired interpreter index in the R settings
[Info  - 下午4:00:10] or provide path to R using `r.interpreterPath` setting.
[Info  - 下午4:00:10] Selected interpreter: [0] R 4.0.4.

[Info  - 下午4:00:10] Starting R Process with C:\Program Files\R\R-4.0.4...
[Info  - 下午4:00:13] complete in 00:02:454
[Info  - 下午4:00:13] Building IntelliSense index...
MikhailArkhipov commented 3 years ago

This probably happens when Outline is open in the left panel. If so, does it go away when document outline is not visible/collapsed? Is there any chance I can get your code to check on the symbol builder? You can send it privately as well. If code is proprietary, perhaps you can experiment a bit like remove some code and see if there is small repro? Thanks!

psychelzh commented 3 years ago

@MikhailArkhipov Interestingly, now I have uninstalled "R LSP" extension, and seemingly, the error does not appear for now.

psychelzh commented 3 years ago

@MikhailArkhipov Now I figured out the case when the error occurs. It sometimes comes out when I am viewing the file differences in the "Version Control" panel. Is it of help?

MikhailArkhipov commented 3 years ago

Looks like the same as #54