On Wed, 11 May 2016, Roger Bivand wrote:

On Wed, 11 May 2016, Simon Urbanek wrote:

 Thanks, that was the correct hint - updating PROJ4 to 4.9.1 seems to fix
 the issue. The new binary is now up - until all mirrors sync up please use
 the main Mac server:
 install.packages("rgdal",,"http://r.research.att.com";)

 Roger, can you, please, add a corresponding regression test to rgdal so a
 failure like the one below would be picked up on check?

Yes, of course, and thank you for resolving this so fast. The next release will also have extra protection contributed by Barry Rowlingson (still testing).

rgdal_1.1-10 submitted to CRAN with additional tests which reproduce the issue (as far as I can tell without being able to check directly), and with a fix by Barry Rowlingson for another problem identified while trying to add the tests. In addition, project() now has an added argument legacy=, which if TRUE will use PROJ.4 pj_fwd() and pj_inv(), or if FALSE will use pj_transform() (on Windows 32-bit it will always use pj_transform()).

The sources are committed to R-Forge.

Anyone able to test this version is very welcome to try it out.

Roger


Roger


 Thanks,
 Simon


 On May 11, 2016, at 7:25 AM, Daniel Kelley <dan.kel...@dal.ca> wrote:

> I apologize for not providing sufficient information in my original > posting. Below I am putting, in markdown notation, the test results > with two setups. I think the key thing is that R 3.3.0 is linking with > an old version of proj (4.8.0) whereas R 3.2.1 was linking with a new > version (4.9.1). > > > # Test 1 with R 3.2.1 (works) > > R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
>     Copyright (C) 2015 The R Foundation for Statistical Computing
>     Platform: x86_64-apple-darwin10.8.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.2.1 (2015-06-18)
>     Platform: x86_64-apple-darwin10.8.0 (64-bit)
>     Running under: OS X 10.11.5 (unknown)
> > 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: 0.9-3, (SVN revision 530)
> Geospatial Data Abstraction Library extensions to R successfully > loaded
>      Loaded GDAL runtime: GDAL 1.11.2, released 2015/02/10
> Path to GDAL shared files: > /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgdal/gdal
>      Loaded PROJ.4 runtime: Rel. 4.9.1, 04 March 2015, [PJ_VERSION: 491]
> Path to PROJ.4 shared files: > /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgdal/proj
>      Linking to sp version: 1.1-0
> >  lon <- 0
> >  lat <- 0
> >  proj <- "+proj=wintri"
> >  xy <- rgdal::project(cbind(lon, lat), proj=proj)
> >  print(xy)
>          [,1] [,2]
>     [1,]    0    0
> >  rgdal::project(xy, proj=proj, inv=TRUE)
>          [,1] [,2]
>     [1,]    0    0
> > > > > > > > > # Test 2 with R 3.3.0 (seg-faults) > > > 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 ...
> > _______________________________________________
>  R-SIG-Mac mailing list
>  R-SIG-Mac@r-project.org
>  https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>




--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: roger.biv...@nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to