vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Terminal crashes with code: 3221225477

Open ajinkya-k opened this issue 2 years ago • 4 comments

Type: Bug

Error message: "The terminal process "C:\Program Files\R\R-4.2.1\bin\x64\R.exe" terminated with exit code: 3221225477. "

Occurs when using R Interactive terminal to run commands.

Issues #91044 and #94499 are not applicable because I am using 64bit VSCode on Windows 11, but the aforementioned issue threads are relevant only for 32bit installations.

EDIT: typo

Extension version: 2.5.2 VS Code version: Code 1.70.1 (6d9b74a70ca9c7733b29f0456fd8195364076dda, 2022-08-10T06:08:33.642Z) OS version: Windows_NT x64 10.0.22000 Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.72GB (4.26GB free)
Process Argv --crash-reporter-id e96a925a-10fe-40fe-b19c-4a75fdd0ee2c
Screen Reader no
VM 0%

ajinkya-k avatar Aug 14 '22 16:08 ajinkya-k

Does the R terminal work in vscode when you use it yourself ?

gowerc avatar Aug 19 '22 09:08 gowerc

The crash occurs when using the R terminal interactively. I have been using Rstudio since the past few days and the R terminal doesn't crash when using it. So its only an issue when using it in VSCode

ajinkya-k avatar Aug 19 '22 16:08 ajinkya-k

Does it crash if you load R from terminal / powershell (not from within vscode) ? And likewise does it Crash if you load R from the terminal in vscode if vscode-R is disabled ? (sorry just trying to isolate where the problem is coming from).

gowerc avatar Aug 19 '22 17:08 gowerc

There is no console crash in Rstudio, it doesn't seem to crash when using it via Powershell on VSCode. When it does crash when using the "R-terminal" it briefly gives a message about running out of memory, but I have tracked memory usage and there doesn't seem to be an overuse of memory.

ajinkya-k avatar Sep 12 '22 16:09 ajinkya-k

I keep observing this behavior when using the R - terminal but not when running R in a powershell terminal.

ajinkya-k avatar Oct 10 '22 15:10 ajinkya-k

Okay I have more information. I had to clean install windows because of some OS driver issues, and this issue resurfaced. The most frequent cause of this issue is trying to use tab completion in R Terminal on VS Code. Is this perhaps caused by me installing the R Tools extension? As soon as I got a warning from VSCode saying R Tools and vscode-R might have conflicts I deleted it, but the crashing persists.

ajinkya-k avatar Nov 01 '22 14:11 ajinkya-k

Hey. Hope this helps.

https://blog.r-project.org/2022/11/01/sporadic-rterm-crashes-with-completion/index.html

TLDR;

The fix is now in R-devel and will be patched to R 4.2.3, it was too late for R 4.2.2.

albertosantini avatar Nov 27 '22 08:11 albertosantini

@albertosantini Thanks! Just one question: there is no R-4.2.3 on the devel download channel. Perhaps the author meant R-4.3.0 ?

ajinkya-k avatar Dec 02 '22 05:12 ajinkya-k

Yep, I suppose Tomas Kalibera, the author of that post, intended the "next" version. Indeed it seems the next one, "eventually" will be 4.3.0. https://cran.r-project.org/bin/windows/base/rdevel.html

Anyway I hope they fixed this annoying bug (and very difficult to track). It happens to me a few times and it is not nice when the terminal crashes in the middle of a session after a long setup of your data. ;)

albertosantini avatar Dec 02 '22 07:12 albertosantini

Sigh. Upgraded to 4.2.3, but after a command completion image

Checking if 4.2.3 contains the changes described in blog post above or maybe postponed.

albertosantini avatar Mar 17 '23 19:03 albertosantini

Bah... In NEWS I don't read any note about fixing the completion for 4.2.3. Sigh.

albertosantini avatar Mar 17 '23 19:03 albertosantini

It seems the changes are still in R-devel: https://stat.ethz.ch/R-manual/R-devel/doc/html/NEWS.html

See: Sporadic crashes of Rterm when using completion have been fixed.

albertosantini avatar Mar 17 '23 21:03 albertosantini

R version 4.3.0 (Already Tomorrow) prerelease versions will appear starting Tuesday 2023-03-21. Final release is scheduled for Friday 2023-04-21.

Confirmed that Sporadic crashes... ^

albertosantini avatar Mar 30 '23 15:03 albertosantini

Tested R 4.3.0, containing that fix above (Sporadic crashes...), and it works ok. I thin we may close this issue.

albertosantini avatar Apr 25 '23 07:04 albertosantini

Thanks for confirming. Closing.

renkun-ken avatar Apr 25 '23 08:04 renkun-ken