ropensci / geojsonio

Convert many data formats to & from GeoJSON & TopoJSON
https://docs.ropensci.org/geojsonio
Other
150 stars 59 forks source link

library(geojsonio) crashes RStudio/R #173

Closed aniruhil closed 2 years ago

aniruhil commented 3 years ago

Merely trying to load library(geojsonio) crashes RStudio. Same result if I load the library in R.app. Details of sessionInfo() follow. Any clue as to what might be going on here?

FWIW I did uninstall the package, restarted RStudio, reinstalled the geojsonio binary, restarted RStudio, and yet ended up with the same result.

Session Info > sessionInfo() > R version 4.0.4 (2021-02-15) > Platform: x86_64-apple-darwin17.0 (64-bit) > Running under: macOS Big Sur 10.16 > Matrix products: default > LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > attached base packages: > [1] stats graphics grDevices utils datasets methods base > loaded via a namespace (and not attached): > [1] processx_3.5.0 compiler_4.0.4 R6_2.5.0 tools_4.0.4 rstudioapi_0.13 > [6] yaml_2.2.1 crayon_1.4.1 callr_3.6.0 ps_1.6.0 pak_0.1.2.9001 ```r library(geojsonio) ```

Here is the error message from R

> library(geojsonio) *** caught segfault *** address 0xffffffff, cause 'memory not mapped' Traceback: 1: dyn.load(file, DLLpath = DLLpath, ...) 2: library.dynam(lib, package, package.lib) 3: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) 4: asNamespace(ns) 5: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) 6: loadNamespace(package, lib.loc) 7: doTryCatch(return(expr), name, parentenv, handler) 8: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9: tryCatchList(expr, classes, parentenv, handlers) 10: tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <- loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)}, error = function(e) { P <- if (!is.null(cc <- conditionCall(e))) paste(" in", deparse(cc)[1L]) else "" msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), P, conditionMessage(e)) if (logical.return) message(paste("Error:", msg), domain = NA) else stop(msg, call. = FALSE, domain = NA)}) 11: library(geojsonio) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection:
sckott commented 3 years ago

Thanks. Not clear from the trace where the problem is. Is this still happening? I can't replicate the problem

aniruhil commented 3 years ago

Still an issue @sckott but I am hoping to do a clean install of R 4.1.x later this month and see if the issue goes away. I appreciate your checking in!

sckott commented 3 years ago

sounds good

lecy commented 3 years ago

@aniruhil I've got students running into the same issue. Did R 4.1.x solve the problem?

aniruhil commented 3 years ago

@aniruhil I've got students running into the same issue. Did R 4.1.x solve the problem?

@lecy I managed to resolve it by uninstalling R and RStudio, and then doing a fresh install. Has worked fine since then. Here is my sessionInfo() in the details

R version 4.1.0 (2021-05-18) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.4 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] geojsonio_0.9.4 loaded via a namespace (and not attached): [1] tidyselect_1.1.1 xfun_0.24 remotes_2.4.0 purrr_0.3.4 [5] memuse_4.1-0 sf_1.0-0 lattice_0.20-44 generics_0.1.0 [9] V8_3.4.2 vctrs_0.3.8 htmltools_0.5.1.1 utf8_1.2.1 [13] rprofile_0.1.7 rlang_0.4.11 gert_1.3.1 e1071_1.7-7 [17] pillar_1.6.1 foreign_0.8-81 glue_1.4.2 prettycode_1.1.0 [21] httpcode_0.3.0 DBI_1.1.1 geojsonsf_2.0.1 sp_1.4-5 [25] prompt_1.0.1 lifecycle_1.0.0 stringr_1.4.0 rgeos_0.5-5 [29] memoise_2.0.0 fastmap_1.1.0 maptools_1.1-1 parallel_4.1.0 [33] curl_4.3.2 sys_3.4 class_7.3-19 fansi_0.5.0 [37] Rcpp_1.0.7 KernSmooth_2.23-20 openssl_1.4.4 classInt_0.4-3 [41] cachem_1.0.5 jsonlite_1.7.2 credentials_1.3.0 askpass_1.1 [45] digest_0.6.27 stringi_1.6.2 dplyr_1.0.7 xaringan_0.22 [49] grid_4.1.0 jqr_1.2.1 cli_3.0.0 tools_4.1.0 [53] magrittr_2.0.1 lazyeval_0.2.2 proxy_0.4-26 geojson_0.3.4 [57] tibble_3.1.2 crul_1.1.0 crayon_1.4.1 pkgconfig_2.0.3 [61] ellipsis_0.3.2 assertthat_0.2.1 rstudioapi_0.13 R6_2.5.0 [65] units_0.7-2 compiler_4.1.0
lecy commented 3 years ago

@aniruhil excellent, thanks!

github-actions[bot] commented 2 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.