I'm trying to use gstat's IDW function with an omax argument
Addition of the omax argument causes R to crash - works fine without it.
*** Error in `/usr/lib/R/bin/exec/R': corrupted double-linked list:
0x00000000038c8540 ***
I'm running R v 3.1 on Ubuntu 12.04
Can anyone else replicate this error on R 3.1 with the following script?
#Crashtest
#Libraries
library(sp)
library(gstat)
library(RColorBrewer)
#make some random xyz point data
x = round(runif(100), 2)
y = round(runif(100), 2)
z = data.frame(rainfall=round(runif(100), 2)*1000)
#convert to spatial points data frame
xy = cbind(x, y)
xy.sp = SpatialPoints(xy)
xy.spdf = SpatialPointsDataFrame(xy.sp, z)
#prepare grid surface
x.range <- range(xy.spdf at coords[,1])
y.range <- range(xy.spdf at coords[,2])
grd <- expand.grid(x=seq(from=x.range[1]-0.5, to=x.range[2]+0.5, by=0.01),
y=seq(from=y.range[1]-0.5, to=y.range[2]+0.5, by=0.01) )
coordinates(grd) <- ~ x+y
gridded(grd) <- TRUE
#perform IDW interpolation and plot results
precip.pal <- colorRampPalette(brewer.pal(7, name="Blues"))
precip.idw3 <- idw(rainfall~1, xy.spdf, grd, idp = 3, maxdist=0.2, omax=2)
spplot(precip.idw3, "var1.pred", col.regions=precip.pal, pretty=TRUE,
main="Rainfall Interpolated (mm)", labels=TRUE,
sp.layout=list("sp.points", xy.spdf, col="red", first=FALSE))
Sent from my iPhone
R crashes performing gstat IDW with omax argument
3 messages · Mark Wynter, Tim Appelhans, Edzer Pebesma
Hey Mark, I'm running R 3.1.2. on Ubuntu 12.04 and see the following with your example: *** glibc detected *** /usr/lib/R/bin/exec/R: free(): invalid next size (fast): 0x00000000073acab0 *** So nearly, though not exactly the same.... I have no idea what it means though, sorry Tim
On 11/24/2014 05:19 AM, Mark Wynter wrote:
I'm trying to use gstat's IDW function with an omax argument
Addition of the omax argument causes R to crash - works fine without it.
*** Error in `/usr/lib/R/bin/exec/R': corrupted double-linked list:
0x00000000038c8540 ***
I'm running R v 3.1 on Ubuntu 12.04
Can anyone else replicate this error on R 3.1 with the following script?
#Crashtest
#Libraries
library(sp)
library(gstat)
library(RColorBrewer)
#make some random xyz point data
x = round(runif(100), 2)
y = round(runif(100), 2)
z = data.frame(rainfall=round(runif(100), 2)*1000)
#convert to spatial points data frame
xy = cbind(x, y)
xy.sp = SpatialPoints(xy)
xy.spdf = SpatialPointsDataFrame(xy.sp, z)
#prepare grid surface
x.range <- range(xy.spdf at coords[,1])
y.range <- range(xy.spdf at coords[,2])
grd <- expand.grid(x=seq(from=x.range[1]-0.5, to=x.range[2]+0.5, by=0.01),
y=seq(from=y.range[1]-0.5, to=y.range[2]+0.5, by=0.01) )
coordinates(grd) <- ~ x+y
gridded(grd) <- TRUE
#perform IDW interpolation and plot results
precip.pal <- colorRampPalette(brewer.pal(7, name="Blues"))
precip.idw3 <- idw(rainfall~1, xy.spdf, grd, idp = 3, maxdist=0.2, omax=2)
spplot(precip.idw3, "var1.pred", col.regions=precip.pal, pretty=TRUE,
main="Rainfall Interpolated (mm)", labels=TRUE,
sp.layout=list("sp.points", xy.spdf, col="red", first=FALSE))
Sent from my iPhone
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
##################################### Tim Appelhans Department of Geography Environmental Informatics Philipps Universit?t Marburg Deutschhausstra?e 12 35032 Marburg (Paketpost: 35037 Marburg) Germany Tel +49 (0) 6421 28-25957 http://environmentalinformatics-marburg.de/
Thanks for the reproducible and small example! I found the bug and committed a fix to r-forge. For the the version that causes this problem, you can use omax when in addition you specify nmax to the same value (but pls check that the output makes sense).
On 11/24/2014 09:20 AM, Tim Appelhans wrote:
Hey Mark, I'm running R 3.1.2. on Ubuntu 12.04 and see the following with your example: *** glibc detected *** /usr/lib/R/bin/exec/R: free(): invalid next size (fast): 0x00000000073acab0 *** So nearly, though not exactly the same.... I have no idea what it means though, sorry Tim On 11/24/2014 05:19 AM, Mark Wynter wrote:
I'm trying to use gstat's IDW function with an omax argument
Addition of the omax argument causes R to crash - works fine without it.
*** Error in `/usr/lib/R/bin/exec/R': corrupted double-linked list:
0x00000000038c8540 ***
I'm running R v 3.1 on Ubuntu 12.04
Can anyone else replicate this error on R 3.1 with the following script?
#Crashtest
#Libraries
library(sp)
library(gstat)
library(RColorBrewer)
#make some random xyz point data
x = round(runif(100), 2)
y = round(runif(100), 2)
z = data.frame(rainfall=round(runif(100), 2)*1000)
#convert to spatial points data frame
xy = cbind(x, y)
xy.sp = SpatialPoints(xy)
xy.spdf = SpatialPointsDataFrame(xy.sp, z)
#prepare grid surface
x.range <- range(xy.spdf at coords[,1])
y.range <- range(xy.spdf at coords[,2])
grd <- expand.grid(x=seq(from=x.range[1]-0.5, to=x.range[2]+0.5,
by=0.01),
y=seq(from=y.range[1]-0.5, to=y.range[2]+0.5, by=0.01) )
coordinates(grd) <- ~ x+y
gridded(grd) <- TRUE
#perform IDW interpolation and plot results
precip.pal <- colorRampPalette(brewer.pal(7, name="Blues"))
precip.idw3 <- idw(rainfall~1, xy.spdf, grd, idp = 3, maxdist=0.2,
omax=2)
spplot(precip.idw3, "var1.pred", col.regions=precip.pal, pretty=TRUE,
main="Rainfall Interpolated (mm)", labels=TRUE,
sp.layout=list("sp.points", xy.spdf, col="red", first=FALSE))
Sent from my iPhone
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma, Co-Editor-in-Chief Computers & Geosciences Institute for Geoinformatics (ifgi), University of M?nster Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251 83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20141124/f85803c0/attachment.bin>