TransWikia.com

Rstudio tries to access parent directories where I don't have access rights and crashes

Stack Overflow Asked by hjw on December 25, 2021

  • My Project is in a shared drive //company/me/project/
  • I have full read/write access to //company/me/
  • I have 0 access rights in //company/

Once in a while my Rstudio crashes with the following message

    Unexpected exception: rstudio_boost:filesystem::status: Access is denied: "//company

After this i can no longer open my project via Rstudio.
The only workaround i have found is to delete .Rproj.user and create a new project in the same folder

Why is Rstudio trying to access //company/? Is there a configuration I can set to prevent this from happening?

Edit: I have noticed that this usually happens when theres a bug in my code or when I try to stop code that is running.

One Answer

A possible reason can be that Rstudio (along with R), saves your session to a .Rdata (either by default or possibly because you clicked "Yes" when it asked to save the workspace to .Rdata). R does this to track reproducibility of a session i.e. to determine the last state when Rstudio was closed (or crashed in your case). And now its trying to restore an exception , which cannot be reproduced as it requires opening up the file and running it (and opening it, is what you want in the first place).

Note that as per RStudio Documentation: .Rproj.user also stores project-specific temporary files (e.g. auto-saved source documents, window-state, etc.).

  • A recommended solution to this is to set option for never saving the session data i.e. every time Rstudio starts , it is starting with a clean slate for your project. If you are concerned about loosing the commands you ran in your last session , set the option of Always Save History (Even when not saving .RData). See the image below to set things as a default (sourced from Hadley's Comment):

Hadley's Reply

The same settings are also present for a Project too:

Answered by Siddharth Bhatia on December 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP