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

rgl crashes in RStudio #11043

Closed
4 tasks done
ms609 opened this issue Apr 22, 2022 · 4 comments
Closed
4 tasks done

rgl crashes in RStudio #11043

ms609 opened this issue Apr 22, 2022 · 4 comments
Assignees

Comments

@ms609
Copy link

@ms609 ms609 commented Apr 22, 2022

Originally reported at dmurdoch/rgl#208

System details

RStudio Edition : Desktop
RStudio Version : 2022.06.0 Build 322
OS Version      : Windows 10 x64
R Version       : 4.2.0 RC (2022-04-21 r82226 ucrt)

Steps to reproduce the problem

install.packages("rgl") (or install_github("dmurdoch/rgl"))
library("rgl")

Describe the problem in detail

RStudio crashes with "R Session Aborted".

Describe the behavior you expected

The rgl library loads fine in RStudio with R4.1.3, and with the standalone R 4.2 GUI

Possibly relevant? I've noticed a change in RStudio's behaviour from R4.1.3 to R4.2: throw in c++ code in R packages was handled safely, but now causes RStudio to crash. I wonder whether there's a change in how R handles exceptions in the new version?

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics-report.txt.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
@kevinushey kevinushey self-assigned this Apr 22, 2022
@glin
Copy link

@glin glin commented Apr 22, 2022

I noticed this too while testing rgl with the R 4.2.0 RC on Windows yesterday. And oddly enough, RStudio doesn't crash if you set options(rgl.debug = TRUE) before loading rgl:

options(rgl.debug = TRUE)

library(rgl)

@nialsiG
Copy link

@nialsiG nialsiG commented Apr 26, 2022

I noticed a similar crash, but after building a homemade package depending on rgl. It occurred with the latest RStudio (RStudio-2022.02.1-461) on R4.2.0. OS: Windows10. Since then, it keeps on crashing without even loading rgl, even after re-installing RStudio...

Edit : setting options(rgl.debug = TRUE) in my .Rprofile worked perfectly, thank you 👍

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Apr 26, 2022

As a workaround, you can set options(rgl.debug = TRUE) in your .Rprofile. I believe @dmurdoch has already merged a fix in dmurdoch/rgl#209 (thank you!) so this should also be resolved in the development version of rgl.

@dmurdoch
Copy link
Contributor

@dmurdoch dmurdoch commented Apr 26, 2022

Yes, @kevinushey is right: the workaround prevents the crash, and the devel version has a check added so the workaround isn't necessary. (The issue was that some Unix systems print spurious error messages on startup, so rgl directed those to the nul device unless you set options(rgl.debug = TRUE) to see them. 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. Thanks Kevin for tracking it down.)

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

5 participants