David Winsemius <dwinsemius <at> comcast.net> writes:

> 
> 
> > 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).
> > 

...


> >> 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
> 

This appears to affect 1.1-9 on OSX. As rgdal maintainer, obviously I'd like
to resolve this, but have mo access to OSX hardware at all. I'm assuming
that the rgdal version is installed as binary from CRAN (thanks to Simon for
providing the binary package!).

Do we know whether the OSX version matters?

Do we know that the same rgdal version 1.1-9 installed from source suffers
from the same problem; if it does, is 1.1-8 free of the problem (as with the
CRAN binary)?

There may be a user-facing work-around - use spTransform (or rawTransform())
rather than project(), but I cannot check it myself:

xy <- rawTransform("+proj=longlat", "+proj=wintri", n=1L, x=0, y=0)
rawTransform("+proj=wintri", "+proj=longlat", n=1L, x=xy[[1]][1], y=xy[[2]][1])

This is using different functions in the PROJ.4 library.

If anyone could provide gdb or similar output of a backtrace, that would be
very helpful.

Roger

> 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.
>

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

Reply via email to