Rstudio crashes on file save if code is running

My RStudio has been crashing quite a bit at random times. I finally found a reproducible reason for it to crash. When there is code running, if I click save on a file, the whole thing crashes. About 99% of the time it crashes immediately on file save, but occasionally it will throw some random error and Rstudio will not fully crash. This rare non-crashing but error instead behavior only seems to occur if I am running a package that throws things to C in the background and the error occurs immediately after C sends the code back to R. The errors usually revolve around memory issues, but they are not the same across occasions (and the code runs fine if I do not save a file while it is running).

Is this a known bug? Are there workarounds? I can, of course, only save files when there is no code actively running, but I save files compulsively... The problem exists on multiple machines that are managed by different organizations (and so have different configurations and versions of Rstudio). Then, this does not seem to be the result of a specific configuration. Therefore, I'm assuming this is a known problem but a bit of searching has not uncovered others complaining about it... I can post machine configurations if this is not a known issue.


What RStudio version are you running? This was a know issue but it was solved reportedly since version 2021.09.0

I am using

RStudio 2021.09.0+351 "Ghost Orchid" Release (077589bcad3467ae79f318afe8641a1899a51606, 2021-09-20) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36

Or at least that is what I have on this machine that has this problem. I can check the other machines later. I must have been searching the wrong terms as I missed that this was supposed to be fixed in the latest version. Are there existing workarounds? beyond not saving while code is running?

I'm not aware of any

I think you should try with the latest RStudio version (2022.02.0+443) and if the problem persists, file an issue on the GitHub repository

1 Like

This topic was automatically closed 21 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.