When I open old RStudio projects containing Git repos, RStudio hangs.
I set up a new Windows 10 development machine, including:
- Installing fresh R development environment (R, RStudio, Git, RTools, MikTeX)
- Downloading my RStudio project directories from cloud storage. These are inevitably developed as R packages, with version control managed by Git.
When I open one of these projects in RStudio, the IDE hangs on startup. The frames load, but remain blank except for the R console. The R prompt loads, but attempting to execute commands results in nothing but blank newlines. Additionally, I cannot close the RStudio session - instead, I get an infinite "Quitting R Session..." progress spinner. The only way to close the RStudio instance - apart from End Task through Task Manager, which prevents any further instances of RStudio starting at all until after reboot, even if I also end the RStudio background processes - is to first click "Terminate R" and then "Quit Session" from the "Session" menu. Even this is not reliable - I often get messages like "Error: unable to establish connection with R session" and "The application was terminated in an unusual way" and "
R encountered a fata error.The session was terminated.". I'd include screenshots, but I'm saving my two newbie-allowed links for the logfiles.
Anyway, after some tinkering I narrowed the problem to something to do with the Git repos. If I delete or remove the .git folder, the project loads fine. If I replace it, the problems return. Strangely, if I clone the entire repo into a new directory, the project also loads without problems. That made me think the problem is buried somewhere in the bowels of .Rproj.user. So I tried removing this folder (and .Rhistory), with no effect. So whatever the issue is, it appears to be narrowly confined to the state of the .git directory, but is strangely resolved when I clone the repo.
You can find the log files on GhostBin here and here. I'm no expert, but they all seem to be related to the bundled C++ library? I had some issues during installation with an over-vigilant BitDefender blocking all kinds of innocuous components, which I thought I had resolved with exemptions and re-installations, but maybe not?
Can anyone suggest a fix?