[R-SIG-Mac] rgdal problem with wintri projection (OSX, R-3.3.0, rgdal 1.1-9)

Daniel Kelley Dan.Kelley at Dal.Ca
Tue May 10 16:36:22 CEST 2016


On OSX, I find that inverse projections yield segmentation faults with the newly-released R (version 3.3.0). This works with both rgdal 1.1-8 and also with 1.1-9 (released yesterday).

Below my signature line is a transcript, within which it is shown that the forward projection from lon=lat=0 yields x=y=0 as expected, but that trying to do the inverse projection with x=y=0 yields a segmentation fault. I’ve put in a sessionInfo() to show the machine type, etc.

I note that aitoff also fails. I’ve not tested the full suite of projections.

NOTE: this test works fine with R-3.2.1.

Dan E. Kelley, Professor  and Graduate Coordinator
Oceanography Department, Dalhousie University
PO BOX 15000
Halifax, NS B3H 4R2
phone:(902)494-1694 fax:(…)-3877 Dan.Kelley at Dal.CA  
http://oceanography.dal.ca/person/Kelley_Dan.html


$ R --no-save < wintri.R

R version 3.3.0 (2016-05-03) -- "Supposedly Educational"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
> library(rgdal)
Loading required package: sp
rgdal: version: 1.1-9, (SVN revision 617M)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.11.4, released 2016/01/25
 Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgdal/gdal
 Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
 Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgdal/proj
 Linking to sp version: 1.2-3 
> lon <- 0
> lat <- 0
> proj <- "+proj=wintri"
> xy <- rgdal::project(cbind(lon, lat), proj=proj)
> print(xy)
     lon lat
[1,]   0   0
> rgdal::project(xy, proj=proj, inv=TRUE)

 *** caught segfault ***
address 0x0, cause 'memory not mapped'

Traceback:
 1: .Call("project_inv", as.integer(nc), as.double(xy[, 1]), as.double(xy[,     2]), proj, as.logical(use_ob_tran), PACKAGE = "rgdal")
 2: rgdal::project(xy, proj = proj, inv = TRUE)
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault: 11



More information about the R-SIG-Mac mailing list