microsoft / RTVS

R Tools for Visual Studio.
MIT License
388 stars 118 forks source link

R help stops working when multiple VS instances are open #4342

Open mkoohafkan opened 5 years ago

mkoohafkan commented 5 years ago

I commonly work on multiple R projects at once, and thus commonly have multiple instances of VS open. Recently I have started getting errors when trying to access R's help via ? when multiple VS instances are open. The error is typically something along the lines of

# example
?sum
Error in file() : cannot open the connection
In addition: Warning message:
In file() :
  cannot open file 'C:\Users\mkoohafk\AppData\Local\Temp\RtmpgTAWFP\Rf56e43e017cdd': No such file or directory

This error usually occurs on all but one of the VS instances, but sometimes all instances return the error when trying to access the help. Closing all VS instances and reopening resolves the issue temporarily, but eventually the error will recur.

priscian commented 5 years ago

This happens to me sometimes in the regular R Console on Windows. There must be a (semi-)regular purge of temp directories by the OS, so sometimes I need to issue the command dir.create(tempdir()) to get help etc. back.