randy3k / radian

A 21 century R console
MIT License
1.96k stars 73 forks source link

Plots crash radian #434

Closed nwillems94 closed 8 months ago

nwillems94 commented 10 months ago

Using Radian (pip v0.6.7) as my R (4.3.0) console in Windows terminal (v1.17.11461.0) in Windows 11. Plotting functionality seems to be broken - the session crashes. Not sure when this started. Here is reproducible example:

R version 4.3.0 (2023-04-21 ucrt) -- "Already Tomorrow"
Platform: x86_64-w64-mingw32 (64-bit)

r$> x <- 1:10

r$> y <- 1:10

r$> plot(x,y)

[process exited with code 3221226505 (0xc0000409)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

Running Rterm in Windows Terminal works fine so this seems to be an issue with Radian and not Windows Terminal. My Windows Terminal configuration looks like:

            {
                "commandline": "C:/Program Files/Python311/Scripts/radian.exe \"--no-history\"",
                "guid": [intentionally ommitted],
                "icon": "C:/Program Files/R/R-4.3.0/doc/html/favicon.ico",
                "name": "R 4.3.0",
                "startingDirectory": "%USERPROFILE%"
            },
MNRK01 commented 9 months ago

This crash also occurs when calling dev.new() or windows(). My vanilla R console works as expected. It seems that attempting to spawn a new window causes the radian console to crash.

I'm using R 4.3.1, radian 0.6.7 and rchitect 0.4.2.

randy3k commented 8 months ago

It is a bug introduced when fixing #430 and #269. I am still trying to figure out a solution. Meanwhile, you could reset the locale by Sys.setlocale("LC_ALL", ""), though it will cause other issues such as #430.