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

David Winsemius dwinsemius at comcast.net
Tue May 10 18:55:35 CEST 2016


> On May 10, 2016, at 7:36 AM, Daniel Kelley <Dan.Kelley at Dal.Ca> wrote:
> 
> 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

I was using slightly out of date versions of the R packages. With rgdal 1.1-8 and sp 1.2-3 there was no segfault. I thought that the difference might be due to the fact that I'm using a later version of PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492].  However, "updating" to rgdal 1.1-9 now produces the same segfault.


-- 

David Winsemius
Alameda, CA, USA



More information about the R-SIG-Mac mailing list