R session aborted very frequently

Hi there,

My Rstudio is crashing very frequently like more than 5 times per hour. It happens while I am 1) fitting a stan model 2) exporting the samples from the fitted model 3) plotting figures with ggplot 4) saving figure using ggpurb 5) just looking at the screen and wondering something else. Sometimes it could take up to 10s for me to save a modification of a .stan or a .R file.

This problem just came out since two weeks, but I did not do anything special (I did update to the new version of Rstudio). According to the research on this forum and Stan forum, I have tried to reinstall R, reinstall Rstudio, reinstall all packages and I am also sure it is not due to memory issue. My RAM usage is below 40% while running the analysis.

I am using Win10 PC, the other Mac user reported a similar issue here Saving edited .rstan files taking long time - #4 by zcai - General - The Stan Forums

Could someone please help? There are several posts here for instance R Session Aborted: R encountered a fatal error when navigating in the file tab. - #4 by Stephen_Ewing and RStudio crashing when navigating through file explorer (system error 10053) - #3 by vitalykorchagin with similar issues but it's hard to find a solution. Someone reported uninstall Onedrive worked IDE OneDrive Conflict crashes IDE file explorer · Issue #7652 · rstudio/rstudio · GitHub, but it is not a solution...

Here is my system info. Thanks a lot.

RStudio Version


Session Information

R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

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

other attached packages:
[1] ggdist_2.4.0 scales_1.1.1 ggpubr_0.4.0 pracma_2.3.3
[5] colormap_0.1.4 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.5
[9] purrr_0.3.4 readr_1.4.0 tidyr_1.1.2 tibble_3.1.0
[13] tidyverse_1.3.0 rstan_2.21.2 ggplot2_3.3.3 StanHeaders_2.21.0-7

loaded via a namespace (and not attached):
[1] httr_1.4.2 jsonlite_1.7.2 carData_3.0-4 modelr_0.1.8
[5] RcppParallel_5.0.3 assertthat_0.2.1 distributional_0.2.2 stats4_4.0.4
[9] cellranger_1.1.0 pillar_1.5.1 backports_1.2.1 glue_1.4.2
[13] digest_0.6.27 ggsignif_0.6.1 rvest_1.0.0 colorspace_2.0-0
[17] pkgconfig_2.0.3 broom_0.7.5 haven_2.3.1 processx_3.4.5
[21] openxlsx_4.2.3 rio_0.5.26 farver_2.0.3 generics_0.1.0
[25] car_3.0-10 ellipsis_0.3.1 withr_2.3.0 cli_2.3.1
[29] magrittr_2.0.1 crayon_1.4.1 readxl_1.3.1 ps_1.6.0
[33] fs_1.5.0 fansi_0.4.1 rstatix_0.7.0 xml2_1.3.2
[37] foreign_0.8-81 pkgbuild_1.2.0 tools_4.0.4 loo_2.4.1
[41] data.table_1.13.6 prettyunits_1.1.1 hms_1.0.0 lifecycle_1.0.0
[45] matrixStats_0.58.0 V8_3.4.0 munsell_0.5.0 reprex_1.0.0
[49] zip_2.1.1 callr_3.5.1 compiler_4.0.4 tinytex_0.28
[53] rlang_0.4.10 grid_4.0.4 rstudioapi_0.13 labeling_0.4.2
[57] gtable_0.3.0 codetools_0.2-18 abind_1.4-5 inline_0.3.17
[61] DBI_1.1.1 curl_4.3 R6_2.5.0 gridExtra_2.3
[65] lubridate_1.7.9.2 utf8_1.1.4 stringi_1.5.3 parallel_4.0.4
[69] Rcpp_1.0.6 vctrs_0.3.6 dbplyr_2.1.0 tidyselect_1.1.0
[73] xfun_0.20

R Version

platform : x86_64-w64-mingw32
arch : x86_64
os : mingw32
system : x86_64, mingw32
status :
major : 4
minor : 0.4
year : 2021
month : 02
day : 15
svn rev : 80002
language : R
version.string : R version 4.0.4 (2021-02-15)
nickname : Lost Library Book

It seems a Rstudio issues and solved in nightly build according to Saving edited .rstan files taking long time - #5 by mike-lawrence - General - The Stan Forums


Just to update, I've been using nightly build Rstudio with Stan the whole day today and did not have any crashes. Saving stan file just take instance as usual. Hopefully, a stable version of Rstudio would be released soon. Thanks a lot.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.