Hi,
I have used sf (or rgdal) succesfully for the last years. Until last week when I installed the latest versions of both R (4.2.1) and RStudio (2022.07.2 build 576). Most scripts work just fine, but when I use sf, or more specific st_layers(), RStudio crashes: 'R Session aborted etc..' . Before the upgrade I could handle a gpkg of 468 Mb with no problems, so memory doesn't seem to be the problem. I also tried different sollutions proposed on the internet and within this group with no results.
I tried a small testing script on three different computers (all Windows 10) with the same results.
Any suggestions?
For testing I use a much smaller gpkg from GeoPackage/docs/examples/rivers.gpkg at 18cb242558cde3857c49be056973175b39dbe7a6 · ngageoint/GeoPackage · GitHub
I use this code for testing:
library("tidyverse")
library("sf")
st_layers("C:/Programmeren/Test_SF/rivers.gpkg")
loading the libraries:
library("tidyverse")
── Attaching packages ──────────────────────────────────────────────────────────────────── tidyverse 1.3.2 ──
ggplot2 3.3.6 purrr 0.3.5
tibble 3.1.8 dplyr 1.0.10
tidyr 1.2.1 stringr 1.4.1
readr 2.1.3 forcats 0.5.2
── Conflicts ─────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
dplyr::filter() masks stats::filter()
dplyr::lag() masks stats::lag()
library("sf")
Linking to GEOS 3.9.1, GDAL 3.4.3, PROJ 7.2.1; sf_use_s2() is TRUE
When I run the st_read statement, I get the session aborted message.
sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=Dutch_Netherlands.utf8 LC_CTYPE=Dutch_Netherlands.utf8 LC_MONETARY=Dutch_Netherlands.utf8
[4] LC_NUMERIC=C LC_TIME=Dutch_Netherlands.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sf_1.0-8 Rcpp_1.0.9 forcats_0.5.2 stringr_1.4.1 dplyr_1.0.10 purrr_0.3.5
[7] readr_2.1.3 tidyr_1.2.1 tibble_3.1.8 ggplot2_3.3.6 tidyverse_1.3.2
loaded via a namespace (and not attached):
[1] tidyselect_1.2.0 haven_2.5.1 gargle_1.2.1 colorspace_2.0-3 vctrs_0.4.2
[6] generics_0.1.3 utf8_1.2.2 rlang_1.0.6 e1071_1.7-11 pillar_1.8.1
[11] glue_1.6.2 withr_2.5.0 DBI_1.1.3 dbplyr_2.2.1 modelr_0.1.9
[16] readxl_1.4.1 lifecycle_1.0.3 munsell_0.5.0 gtable_0.3.1 cellranger_1.1.0
[21] rvest_1.0.3 tzdb_0.3.0 class_7.3-20 fansi_1.0.3 broom_1.0.1
[26] KernSmooth_2.23-20 scales_1.2.1 backports_1.4.1 googlesheets4_1.0.1 classInt_0.4-8
[31] jsonlite_1.8.2 fs_1.5.2 hms_1.1.2 stringi_1.7.8 grid_4.2.1
[36] cli_3.4.1 tools_4.2.1 magrittr_2.0.3 proxy_0.4-27 crayon_1.5.2
[41] pkgconfig_2.0.3 ellipsis_0.3.2 xml2_1.3.3 reprex_2.0.2 googledrive_2.0.0
[46] lubridate_1.8.0 assertthat_0.2.1 httr_1.4.4 rstudioapi_0.14 R6_2.5.1
[51] units_0.8-0 compiler_4.2.1