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 causing R and R Studio to abort #43

Closed
olibee1315 opened this issue Mar 4, 2021 · 10 comments
Closed

rgl causing R and R Studio to abort #43

olibee1315 opened this issue Mar 4, 2021 · 10 comments

Comments

@olibee1315
Copy link

I am running macOS Big Sur 11.2.2 on a MBP 16-inch, 2019. I recently updated to R 4.0.4 and R Studio 1.4.1103. I have XQuartz 2.8.0_rc2 installed. I have rgl version 0.105.13 installed. Every time I try to load rgl in either R Studio or Terminal the session aborts. Curiously, my desktop, which is running macOS Catalina 10.15.7 21.5-inch, late 2013, R 4.0.3, R Studio 1.4.1103, and XQuartz 2.8.0_rc2 loads and runs rgl as expected.

@dmurdoch
Copy link
Owner

dmurdoch commented Mar 4, 2021

There are a couple of issues with XQuartz recently, related to its updates. See issue #27. I believe the current rgl devel version works fine: install it using

remotes::install_github("dmurdoch/rgl")

Note that rgl installs tend to be a little tricky, so this might not work for you. In that case, you'll have to wait for the next CRAN release, which I hope will happen within a few days. Unfortunately, there have also been other problems with the XQuartz updates not including a compatible version of libx11 as XQuartz 2.7.11 (see issue #11), so you may need to rebuild rgl to get it to run on your system, or downgrade XQuartz to 2.7.11, which is also kind of tricky.

@olibee1315
Copy link
Author

Thank you. Unfortunately this did not solve the problem. I installed the devel version of rgl as suggested and R still aborts. I have already tried downgrading XQuartz; R doesn't abort but the output doesn't show up either. I can still run the process on my iMac just fine, it's just a little slower. Hopefully CRAN will have a fix soon. Thanks again for your help and efforts!

@dmurdoch
Copy link
Owner

dmurdoch commented Mar 4, 2021

The devel version has just been submitted to CRAN, so unless something new shows up in their tests, waiting for CRAN isn't going to help.

Some tests that might help:

Does x11() work in the places where rgl causes an abort? It should open a graphics window. If it doesn't work, the problem is with XQuartz.

Does sessionInfo() show the rgl version is 0.105.22? Maybe the devel install failed.

If you run quartz() before library(rgl), do you still get an abort? One of the problems that was supposed to be fixed was caused by running quartz() after rgl, so it now tries to run it during the loading process. That might not be happening if it doesn't detect a need for it, but you can force the workaround by setting options(rgl.startQuartz = TRUE) before loading rgl.

@olibee1315
Copy link
Author

olibee1315 commented Mar 8, 2021 via email

@dmurdoch
Copy link
Owner

dmurdoch commented Mar 8, 2021

I don't really know what to suggest, other than the fairly unsatisfactory

remotes::install_github("dmurdoch/rgl", install.opts = "--disable-opengl")

That will build rgl to skip X11 completely. You will be able to see output in a browser using rglwidget() calls, or options(rgl.printRglwidget = TRUE). This is not too bad in RStudio, but very irritating in other front ends.

@olibee1315
Copy link
Author

olibee1315 commented Mar 9, 2021 via email

@dmurdoch
Copy link
Owner

dmurdoch commented Mar 9, 2021

That does make it sound like an XQuartz issue, but from the look of the messages, maybe one that can be fixed. It looks something like this one: XQuartz/XQuartz#97

@olibee1315
Copy link
Author

olibee1315 commented Mar 9, 2021 via email

@dmurdoch
Copy link
Owner

dmurdoch commented Mar 9, 2021

Just for the record, could you describe what you did that worked?

@olibee1315
Copy link
Author

olibee1315 commented Mar 9, 2021 via email

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

2 participants