RStudio Not Quitting

When I select File Session, RStudio issues a message, Quitting R Studio. But it does not quit.
When I select Session Terminate R, it does not terminate.
When I click X in the upper right, it does not terminate.
I can quit RStudio only through the Task Manager or restarting laptop.
Any suggestions?

Is this a recurrent problem? That is, does this happen every time you try to quit R Studio?

Is there a command running when you are trying to quit?

Sometimes if you there is a command running which executes underlying C/C++/Fortran code, especially if it's in a very tight loop that doesn't check for interrupts from the user, you'll be unable to communicate with R to tell it to quit.

If there is no command running, other things which might cause it to hang are if you have very large workspace image and it is trying to save to it to disk. Clearing your environment before closing R can help with this.

I've also seen issues with R/R Studio lagging/freezing when the amount of information in the console is ridiculously large (e.g. you've printed to console several long character vectors containing long character strings, like the text of a book). Clearing your console window will help with this.

If none of these apply and if after opening a pristine R project with no saved worspace image, no environment, and no command history, it still hangs when you attempt to terminate R, there may be some system level issues causing it to hang. This might be anything from file/directory permissions (R as part of its closing process updates several files on disk, if R (or you) has insufficient permissions to update these files (or if these files are locked by another process), things might hang.

As cliche as it sounds, it might not be a bad idea to just reboot your system and see if that clears things up.

Thank you so much.
This is now a recurring problem. I have been successfully running an rmd project, but a few days ago this problem arose.
I cleared memory and the console window. I have updatedRStudio. I have rebooted multiple times. I am now updating Windows 10.
Needless to say, spending six hours to get three added lines of code to work is frustrating.
I’ll let you know what happens.

Thank you again.
Upgrading Windows 10 seems to have helped, but a cold reboot may have done the trick.
All is well now.

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.