Runtime Error on exit

Recently I have been getting the following error whenever I close my Rstudio window:


The issue is not super pressing since I haven't had any issues while I am actually using RStudio but I thought I would mention it. When I first started getting the error I was using R 3.4.1 and RStudio 1.1.383. I updated my R version to 3.4.3 and uninstalled and reinstalled Rstudio and still got the error after each.

Here is the my output to sessionInfo():

> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

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

And I get the error when I close my RStudio without having done anything except opening the app.

Any ideas why I am getting this error or how to resolve it?

I wasn't able to reproduce this on my Windows VM. Can you provide any other information? Does it occur even in RStudio sessions where you start the IDE, and then immediately close it, without running any R code or loading any R packages?

Yes, I get it when I open and then immediately close the IDE. This happens whether I open it via the icon in the taskbar or from a .Rproj object in file explorer.

Have you done any customization to user / sitewide R startup files (e.g. your ~/.Rprofile)? Do you see the same issue if you run RStudio with different versions of R? Do you see this in all kinds of RStudio projects, or just a few ones?

The issue occurred while I used both R version 3.4.1 and 3.4.3.

I have not made any changes to my .Rprofile, all that is in it is this:

Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")

I don't think I added that myself, and if I did I don't remember doing it (or for what reason). This occurs when I close any kind of RStudio project (including ones saved to my local hard drive and ones saved to a network file sharing server).

@kevinushey Just an FYI, I am no longer getting this error. I have not made any changes to my R or Rstudio versions. My computer is automatically updated each weekend, so it may have been an issue with a windows update.

Glad to hear that the issue is resolved! It's unfortunate that we still don't know what the underlying cause might've been but at least you're in good shape now.