Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`rgl` crashes R 4.2.0 in RStudio

The new release of R version 4.2.0 will crash when loading the rgl package if in RStudio. What can I do about it?

like image 818
user2554330 Avatar asked Oct 20 '25 17:10

user2554330


1 Answers

This is a bug in the startup code that was introduced in 0.100.50 and fixed in release 0.108.3.2. If you're using a version that has the bug, a workaround is to run options(rgl.debug = TRUE) before starting rgl. For example, you could put that line in your .Rprofile.

The background was that some Unix systems print spurious error messages on startup, so rgl directed those to the nul device. If you wanted to see them, you could set options(rgl.debug = TRUE). But what's new is that the nul device sometimes fails to open in Windows. rgl wasn't checking for that, but now it does.

See https://github.com/rstudio/rstudio/issues/11043 for more discussion.

like image 161
user2554330 Avatar answered Oct 23 '25 06:10

user2554330