Cannot open and save existing r files in rstudio

Hi, I have used the latest version of R and R studio in windows 10, after updating R and R studio the older r files are not open in r studio. Only blank files are shown in the editor but copying from the file and pasting in the editor works but while saving these files 0 kb files are held on the file name given. I have uninstalled and re-installed many times but could not solve the problem. Please help me how to fix this problem. But all files are open in R and R projects are also open in R studio.
after installing old version 2021.09 I got this error

R Session Startup Failure Report

RStudio Version

RStudio 2021.09.0+351, "Ghost Orchid" (077589bc, 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

Error message

[No error available]

Process Output

The R session exited with code -1073740791.

Error output:

[No errors emitted]

Standard output:

[No output emitted]

Logs

C:/Users/LP Sapkota/AppData/Local/RStudio/log/rsession-LP Sapkota.log

2022-05-31T02:22:32.468541Z [rsession-LP Sapkota] ERROR system error 5 (Access is denied) [path: D:/Research_World/My_papers/new work/Gpz_Half_Logistic/Gompertz_Half_Logistic/.Rproj.user/78F18BEC/sources/per/t]; OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::FilePath::remove(void) const src/cpp/shared_core/FilePath.cpp:1551; LOGGED FROM: class rstudio::core::Error __cdecl rstudio::session::source_database::supervisor::detachFromSourceDatabase(void) C:\Users\jenkins\workspace\ide\open-source-pipeline\prairie-trillium\src\cpp\session\SessionSourceDatabaseSupervisor.cpp:519
2022-05-31T02:22:32.480542Z [rsession-LP Sapkota] ERROR system error 5 (Access is denied) [path: D:/Research_World/My_papers/new work/Gpz_Half_Logistic/Gompertz_Half_Logistic/.Rproj.user/78F18BEC/sources/s-8E4A6E7D]; OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::FilePath::remove(void) const src/cpp/shared_core/FilePath.cpp:1551; LOGGED FROM: void __cdecl rstudio::session::source_database::`anonymous-namespace'::onQuit(void) C:\Users\jenkins\workspace\ide\open-source-pipeline\prairie-trillium\src\cpp\session\SessionSourceDatabase.cpp:1020
2022-05-31T02:22:32.480542Z [rsession-LP Sapkota] ERROR system error 5 (Access is denied) [path: D:/Research_World/My_papers/new work/Gpz_Half_Logistic/Gompertz_Half_Logistic/.Rproj.user/78F18BEC/sources/s-8E4A6E7D]; OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::FilePath::remove(void) const src/cpp/shared_core/FilePath.cpp:1551; LOGGED FROM: void __cdecl rstudio::session::source_database::`anonymous-namespace'::onQuit(void) C:\Users\jenkins\workspace\ide\open-source-pipeline\prairie-trillium\src\cpp\session\SessionSourceDatabase.cpp:1020

This was caused by an incompatibility between RStudio and R 4.2. You can address it either by using R 4.1, or by updating to the latest RStudio release (2022.02.3), which supports R 4.2.

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.