R Studio (Version 1.2.1070) Closes when Windows is Locked (Windows + L)


I truly have no idea whats going on. I start a fresh session of R studio and when I lock my Windows 10 computer (Windows + L), and log back in, Rstudio is automatically closed. This has lead me to lose alot of work simply because I wait fro scripts to run and come back to find that Rstudio has been closed.I have been searching forums for hours but can't seem to track down the issue. Anyone experiencing similar issues? Help?


I wasn't able to reproduce this. Can you provide any other information?

  • Does RStudio always close in this way when you lock the desktop? Or does it seem to depend on which R project you have opened, or what kind of R code you've been executing, or anything similar?

  • Is RStudio installed on your local filesystem? Are you using RStudio with e.g. mounted or network drives?

A diagnostics report may also be helpful.


Sorry for the late reply. I really appreciate the help

  • I ran multiple tests and it almost always happens with I put the computer to sleep. As soon as the computer comes out of sleep, Rstudio is closed (regardless whether code is running or not)

  • Rstudio is installed locally.

Below is the diagnostic report

[1] "1.2.1070"

[1] "C:\\PROGRA~1\\R\\R-35~1.1\\bin\\x64\\R.exe"

[1] ""

[1] ""

[1] ""

[1] "C:\\PROGRA~1\\Git\\cmd\\git.exe"

[1] ""

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1   

          sysname           release           version 
        "Windows"          "10 x64"     "build 17134" 
         nodename           machine             login 
"DESKTOP-A3TAVHK"          "x86-64"           "husam" 
             user    effective_user 
          "husam"           "husam" 

R Version:
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
major          3                           
minor          5.1                         
year           2018                        
month          07                          
day            02                          
svn rev        74947                       
language       R                           
version.string R version 3.5.1 (2018-07-02)
nickname       Feather Spray               
[1] "C:\\ProgramData"

[1] "C:\\Users\\husam\\AppData\\Roaming"

[1] "1"

[1] "C:\\Program Files\\Common Files"

[1] "C:\\Program Files (x86)\\Common Files"

[1] "C:\\Program Files\\Common Files"


[1] "C:\\WINDOWS\\system32\\cmd.exe"

[1] "C:\\WINDOWS\\ConfigSetRoot"

[1] ":0"

[1] "C:\\Windows\\System32\\Drivers\\DriverData"

[1] "Internet Explorer"

[1] "Default"

[1] "-1"

[1] "-1"

[1] "C:/Users/husam/OneDrive/Documents"

[1] "C:"

[1] "\\Users\\husam"

[1] "C:\\Users\\husam\\AppData\\Local"


[1] "R_ARCH"

[1] "8"

[1] "C:\\Users\\husam\\OneDrive"

[1] "Windows_NT"

[1] "C:\\Program Files\\R\\R-3.5.1\\bin\\x64;C:\\Rtools\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\Git\\cmd;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\R\\R-3.5.1\\bin;C:\\Program Files\\CMake\\bin;C:\\Rtools\\bin;C:\\Users\\husam\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\husam\\AppData\\Local\\GitHubDesktop\\bin;%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps;"


[1] "AMD64"

[1] "Intel64 Family 6 Model 142 Stepping 10, GenuineIntel"

[1] "6"

[1] "8e0a"

[1] "C:\\ProgramData"

[1] "C:\\Program Files"

[1] "C:\\Program Files (x86)"

[1] "C:\\Program Files"

[1] "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules"

[1] "C:\\Users\\Public"

[1] "1"

[1] "/x64"

[1] "gcc 4.9.3"

[1] "C:/PROGRA~1/R/R-35~1.1/doc"

[1] "C:/PROGRA~1/R/R-35~1.1"

[1] "C:/Users/husam/OneDrive/Documents/R/win-library/3.5"

[1] "C:/Users/husam/OneDrive/Documents"

[1] "C:/Program Files/RStudio/resources/mathjax-26"

[1] "\\\\.\\pipe\\15334-rsession"

[1] "C:/Program Files/RStudio/bin/rpostback"

[1] "63341846741"

[1] "1"

[1] "256"

[1] "80"

[1] "C:/Program Files/RStudio/bin/msys-ssh-1000-18"

[1] "C:/Program Files/RStudio/bin/pandoc"

[1] "15334"

[1] "husam"

[1] "C:/Program Files/RStudio/bin/winutils"

[1] "Console"

[1] "C:"

[1] "C:\\WINDOWS"

[1] "C:\\Users\\husam\\AppData\\Local\\Temp"

[1] "xterm-256color"

[1] "C:\\Users\\husam\\AppData\\Local\\Temp"



[1] "husam"

[1] "C:\\Users\\husam"

[1] "C:\\WINDOWS"

 [1] ".GlobalEnv"        "tools:rstudio"    
 [3] "package:stats"     "package:graphics" 
 [5] "package:grDevices" "package:utils"    
 [7] "package:datasets"  "package:methods"  
 [9] "Autoloads"         "package:base"


Normally, there should be diagnostic information at the bottom of the report as well (reporting different errors, if any, that occurred while RStudio was running). Did you exclude that when copying the report here, or was there really nothing?


Thats all there was in that file that was created. Nothing was displayed passed that.


Been doing some more testing and it seems like Windows closes down Rstudio when it uses ~20+% CPU usage after unlocking my computer (not putting in sleep or anything). I tested it with other programs and this does not happen. Just to add some more context


Update: I uninstalled Rstudio 1.2.1070 and installed Rstudio v 1.1.463 and now I am not seeing the issue. I ran the same tests I mentioned and everything works fine now. I can try re-installing 1.2.1070 to see if a simply re-install would do the trick