[R] (old) rgl package crashes MacGUI using R 3.2.3 in El Cap, new compiled one does not.

David Winsemius dwinsemius at comcast.net
Thu Dec 31 03:28:53 CET 2015

Earlier today I had been getting an warning message when loading pkg:rgl (and then failing to get any plotting to an X11 window),  so I decided to re-install the binary 0.95.1201 from a CRAN mirror:

XQuartz 2.7.8 has been installed and reinstalled multiple times including just a few minutes before this. Also have current XCode and CLT.

> library(rgl)
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grDevices utils     datasets  stats     graphics  grid      methods  
[8] base     

other attached packages:
 [1] rgl_0.95.1201   rms_4.4-0       SparseM_1.7     Hmisc_3.17-0   
 [5] ggplot2_2.0.0   Formula_1.2-1   survival_2.38-3 sos_1.3-8      
 [9] brew_1.0-6      lattice_0.20-33

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.2         cluster_2.0.3       splines_3.2.3      
 [4] munsell_0.4.2       colorspace_1.2-6    multcomp_1.4-1     
 [7] plyr_1.8.3          tools_3.2.3         nnet_7.3-11        
[10] gtable_0.1.2        nlme_3.1-122        quantreg_5.19      
[13] TH.data_1.0-6       latticeExtra_0.6-26 MatrixModels_0.4-1 
[16] polspline_1.1.12    Matrix_1.2-3        gridExtra_2.0.0    
[19] RColorBrewer_1.1-2  codetools_0.2-14    acepack_1.3-3.3    
[22] rpart_4.1-10        sandwich_2.3-4      scales_0.3.0.9000  
[25] mvtnorm_1.0-3       foreign_0.8-66      zoo_1.7-12         
[28] proto_0.3-10       

This is( ... er was) the crash log when done from the macGUI. When running from a Terminal window I get no error and the XQuartz/X11 window displays everything without problem. 

I also tried renaming the .Rprofile file that loads all that other stuff to hide it from the GUI-launch process, and just loading with rgl and the base packages and it still crashes (i.e. the MacGUI window disappears and a crash report appears.) 

Last minute update: I then installed the source version: rgl_0.95.1435.tar.gz and it loaded without complaint and executes the code in either session type:

In a Terminal window session with nothing in the .Rprofile:

install.packages("/Users/davidwinsemius/Downloads/rgl_0.95.1435.tar.gz", repo=NULL, dependencies=TRUE, type="source") 

Then in MacGUI:

n <- 50
theta <- runif(n,0,2*pi)
u <- runif(n,-1,1)
x <- sqrt(1-u^2)*cos(theta)
y <- sqrt(1-u^2)*sin(theta)
z <- u

I see that the compile process fails with a message:

	• checking files in ‘vignettes’ ... OK
	• checking examples ... ERROR
Running examples in ‘rgl-Ex.R’ failed
The error most likely occurred in:

> ### Name: rgl.pixels
> ### Title: Extract pixel information from window
> ### Aliases: rgl.pixels
> ### Keywords: dynamic
> ### ** Examples
> example(surface3d)

srfc3d> #
srfc3d> # volcano example taken from "persp"
srfc3d> #
srfc3d> data(volcano)

srfc3d> z <- 2 * volcano # Exaggerate the relief

I tried running the contents of test/demo.R and got 21 different rgl windows, but no error. I was eventually able to find the offending code of : 'rgl-Ex.R' in the rgl.pixels.Rd file and copied and that code in a  GUI session with no errors reported.

So I guess the question is ... why is the build process for the Mavericks/Yosemite/El Capitan machines still failing to produce a current (working) version of rgl?


snipped crash logs.

David Winsemius
Alameda, CA, USA

More information about the R-help mailing list