Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terra::buffer() R crash - R version 4.3.3 #1531

Open
Graczykowski opened this issue Jun 4, 2024 · 1 comment
Open

terra::buffer() R crash - R version 4.3.3 #1531

Graczykowski opened this issue Jun 4, 2024 · 1 comment

Comments

@Graczykowski
Copy link

Hello, terra::buffer() function keeps crashing when creating buffer around line SpatVector. This is the smallest shapefile data on which I was able to reproduce this error (https://data.sandiego.gov/datasets/bike-route-lines/). It occurs on R version 4.3.3 on Windows 11 and works correctly on R version 4.4.0. Additionally, increasing width of buffer solves the problem.

library(terra)

bike = vect("/vsizip/vsicurl/https://seshat.datasd.org/gis_bike_routes/bike_routes_datasd.zip")
buffer(bike, 1) # crashes R

buffer(bike, 200) # crashes R

buffer(bike, 1000) # works properly

Windows 11 session info

> sessionInfo()​
R version 4.3.3 (2024-02-29 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)
 
Matrix products: default
 
 
locale:
[1] LC_COLLATE=Polish_Poland.utf8  LC_CTYPE=Polish_Poland.utf8  
[3] LC_MONETARY=Polish_Poland.utf8 LC_NUMERIC=C                 
[5] LC_TIME=Polish_Poland.utf8   
 
time zone: Europe/Warsaw
tzcode source: internal
 
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
[1] terra_1.7-78

loaded via a namespace (and not attached):
[1] compiler_4.3.3   tools_4.3.3      Rcpp_1.0.12      codetools_0.2-19

When I was reproducing the problem on posit.cloud crash did not occur.

Posit.cloud session info

> sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8    
 [5] LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8       LC_NAME=C             
 [9] LC_ADDRESS=C           LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

time zone: UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] terra_1.7-78

loaded via a namespace (and not attached):
[1] compiler_4.3.3    cli_3.6.2         tools_4.3.3       rstudioapi_0.16.0 Rcpp_1.0.12       codetools_0.2-19 
[7] rlang_1.1.3      
@rhijmans
Copy link
Member

This works for me on Windows and Ubuntu with R 4.4.2 and the CRAN and dev version of "terra".

R.version$version.string
#[1] "R version 4.4.2 (2024-10-31)" 
gdal(lib="geos")
# [1] "3.12.2"
packageVersion("terra")
[1] ‘1.7.83’

Does it also work for you with the current versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants