R 3.5.1 with RStudio 1.1.453 on Windows 10 aborting at simple setwd() command

windows
crash-report

#1

Rstudio 1.1.453 with R 3.5.1 is hanging on my Windows 10 desktop computer when issuing a basics setwd() command. Error is: C stack usage 20029438 is too close to the limit. I presume this means a function is being called recursively until the stack overflows. After this error, the R session aborts. When I say "Start New Session", the new one aborts on its own after a minute.

The same setwd() works normally with the RGui interface. The problem only occurs in RStudio.

I tried completely uninstalling and reinstalling both R and RStudio, but the problem is still there.

Update:
It is definitely an RStudio IDE problem. Trying to give any command at the RStudio console causes the temporary hang that ends with the C stack usage error being displayed and the R Session aborting. Running R directly with the RGui works completely fine.


#2

Does this only occur when you attempt to navigate to certain directories, or all directories? Is there anything special / unique about the directories you're attempting to navigate to?


#3

Hello Kevin, As I say in the update I just made to my original post, I have now found that any command given in the RStudio console window causes the hang, error message, abort behavior. Even something like x <- 1. Running R directly using RGui works fine.


#4

Update: I have two other Windows 10 machines running the same versions of R and RStudio that are not having the problem. My current speculation is that on the machine that does have the problem, there is some setting persistent across un-installs/re-installs of RStudio that causes it to go into a recursive call spiral upon launch. I would imagine the problem setting is either in the registry or in the environment variables, but I would appreciate some suggestions on exactly what to look for.


#5

Are you able to run a diagnostics report on the affected machine? https://support.rstudio.com/hc/en-us/articles/200321257-Running-a-Diagnostics-Report


#6

I was able to run a diagnostic report using Windows Start > Run, not from within RStudio. Since as a new user to the community, I cannot upload files, how would you like me to send the report and copy of the terminal session to you?


#7

The terminal session text follows:

Attempting to launch R session...
R_HOME=C:\PROGRA~1\R\R-35~1.1
PATH=C:\Program Files\R\R-3.5.1\bin\x64;C:\app\client\USER\product\12.1.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Common Files\MicroStrategy;C:\Program Files (x86)\MicroStrategy\Developer;C:\Program Files (x86)\MicroStrategy\Command Manager;C:\Program Files (x86)\Common Files\MicroStrategy\JRE\180_77\Win32\bin;C:\Program Files (x86)\Common Files\MicroStrategy\JRE\180_77\Win64\bin;C:\Program Files (x86)\Common Files\MicroStrategy\JRE\180_77\Win64\bin\server;C:\Program Files (x86)\Common Files\MicroStrategy\Help\English;C:\Users\wilkinson_r\AppData\Local\Microsoft\WindowsApps;

R session launched, attempting to connect on port 23534...

Connected to R session, attempting to initialize...

Successfully initialized R session.

Diagnostics report written to: C:/Users/wilkinson_r/Documents/rstudio-diagnostics/diagnostics-report.txt

C:\Program Files\RStudio>


The entire diagnostic log file has too many characters to be included here as text. It has many days of identical session logs though, so I will just include the preamble and the logs dated on the last day I tried to use RStudio on the problem computer, which was July 17, 2018.

The diagnostic log file text follows:

[1] "1.1.453"

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

$pdflatex
[1] ""

$bibtex
[1] ""

$gcc
[1] ""

$git
[1] ""

$svn
[1] ""

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[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 methods base

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

SysInfo:
sysname release version nodename
"Windows" ">= 8 x64" "build 9200" "64PVTW10N00112"
machine login user effective_user
"x86-64" "wilkinson_r" "wilkinson_r" "wilkinson_r"

R Version:
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
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
$ALLUSERSPROFILE
[1] "C:\ProgramData"

$APPDATA
[1] "C:\Users\wilkinson_r\AppData\Roaming"

$CLICOLOR_FORCE
[1] "1"

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

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

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

$COMPUTERNAME
[1] "64PVTW10N00112"

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

$DEFLOGDIR
[1] "C:\ProgramData\McAfee\DesktopProtection"

$FPS_BROWSER_APP_PROFILE_STRING
[1] "Internet Explorer"

$FPS_BROWSER_USER_PROFILE_STRING
[1] "Default"

$GFORTRAN_STDERR_UNIT
[1] "-1"

$GFORTRAN_STDOUT_UNIT
[1] "-1"

$HOME
[1] "C:/Users/wilkinson_r/Documents"

$HOMEDRIVE
[1] "C:"

$HOMEPATH
[1] "\Users\wilkinson_r"

$LOCALAPPDATA
[1] "C:\Users\wilkinson_r\AppData\Local"

$LOGONSERVER
[1] "\\CHB3"

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

$MSTR_REGISTRY_FILE
[1] "C:\Program Files (x86)\Common Files\MicroStrategy\MSIReg.reg"

$MSYS2_ENV_CONV_EXCL
[1] "R_ARCH"

$NUMBER_OF_PROCESSORS
[1] "8"

$NumberFormattingCustomization
[1] "C:\PROGRA~2\COMMON~1\MICROS~2\NUMBER~1.XML"

$OneDrive
[1] "C:\Users\wilkinson_r\OneDrive"

$OS
[1] "Windows_NT"

$PATH
[1] "C:\Program Files\R\R-3.5.1\bin\x64;C:\app\client\USER\product\12.1.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\MicroStrategy;C:\Program Files (x86)\MicroStrategy\Developer;C:\Program Files (x86)\MicroStrategy\Command Manager;C:\Program Files (x86)\Common Files\MicroStrategy\JRE\180_77\Win32\bin;C:\Program Files (x86)\Common Files\MicroStrategy\JRE\180_77\Win64\bin;C:\Program Files (x86)\Common Files\MicroStrategy\JRE\180_77\Win64\bin\server;C:\Program Files (x86)\Common Files\MicroStrategy\Help\English;C:\Users\wilkinson_r\AppData\Local\Microsoft\WindowsApps;"

$PATHEXT
[1] ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"

$PROCESSOR_ARCHITECTURE
[1] "AMD64"

$PROCESSOR_IDENTIFIER
[1] "Intel64 Family 6 Model 158 Stepping 9, GenuineIntel"

$PROCESSOR_LEVEL
[1] "6"

$PROCESSOR_REVISION
[1] "9e09"

$ProgramData
[1] "C:\ProgramData"

$ProgramFiles
[1] "C:\Program Files"

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

$ProgramW6432
[1] "C:\Program Files"

$PROMPT
[1] "$P$G"

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

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

$R_ARCH
[1] "/x64"

$R_COMPILED_BY
[1] "gcc 4.9.3"

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

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

$R_LIBS_USER
[1] "C:/Users/wilkinson_r/Documents/R/win-library/3.5"

$R_USER
[1] "C:/Users/wilkinson_r/Documents"

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

$RS_LOCAL_PEER
[1] "\\.\pipe\23534-rsession"

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

$RS_SHARED_SECRET
[1] "63341846741"

$RSTUDIO
[1] "1"

$RSTUDIO_CONSOLE_COLOR
[1] "256"

$RSTUDIO_CONSOLE_WIDTH
[1] "80"

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

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

$RSTUDIO_SESSION_PORT
[1] "23534"

$RSTUDIO_USER_IDENTITY
[1] "wilkinson_r"

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

$SESSIONNAME
[1] "Console"

$SystemDrive
[1] "C:"

$SystemRoot
[1] "C:\WINDOWS"

$TEMP
[1] "C:\Users\WILKIN~1\AppData\Local\Temp"

$TERM
[1] "xterm-256color"

$TMP
[1] "C:\Users\WILKIN~1\AppData\Local\Temp"

$UATDATA
[1] "C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77"

$USERDNSDOMAIN
[1] "CHBOSTON.ORG"

$USERDOMAIN
[1] "CHBOSTON"

$USERDOMAIN_ROAMINGPROFILE
[1] "CHBOSTON"

$USERNAME
[1] "wilkinson_r"

$USERPROFILE
[1] "C:\Users\wilkinson_r"

$VSEDEFLOGDIR
[1] "C:\ProgramData\McAfee\DesktopProtection"

$windir
[1] "C:\WINDOWS"

[1] ".GlobalEnv" "tools:rstudio" "package:stats"
[4] "package:graphics" "package:grDevices" "package:utils"
[7] "package:datasets" "package:methods" "Autoloads"
[10] "package:base"
Log file: rdesktop.log

17 Jul 2018 18:16:13 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: virtual void rstudio::core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:/Users/Administrator/rstudio/src/cpp/core/include/core/http/NamedPipeAsyncClient.hpp:84; LOGGED FROM: void rstudio::desktop::NetworkReply::onError(const rstudio::core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:288
17 Jul 2018 18:16:13 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: virtual void rstudio::core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:/Users/Administrator/rstudio/src/cpp/core/include/core/http/NamedPipeAsyncClient.hpp:84; LOGGED FROM: void rstudio::desktop::NetworkReply::onError(const rstudio::core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:288

...repeated output continues until...

18 Jul 2018 18:43:38 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: virtual void rstudio::core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:/Users/Administrator/rstudio/src/cpp/core/include/core/http/NamedPipeAsyncClient.hpp:84; LOGGED FROM: void rstudio::desktop::NetworkReply::onError(const rstudio::core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:288
18 Jul 2018 18:43:48 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: virtual void rstudio::core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:/Users/Administrator/rstudio/src/cpp/core/include/core/http/NamedPipeAsyncClient.hpp:84; LOGGED FROM: void rstudio::desktop::NetworkReply::onError(const rstudio::core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:288

Log file: rsession-wilkinson_r.log

17 Jul 2018 13:33:39 [rsession-wilkinson_r] CLIENT EXCEPTION (rsession-wilkinson_r): (TypeError) : undefined is not an object (evaluating 'this.a.a.r.row');|||com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Exceptions.java#28::wrap|||com/google/gwt/core/client/impl/SchedulerImpl.java#167::runScheduledTasks|||com/google/gwt/core/client/impl/SchedulerImpl.java#338::flushPostEventPumpCommands|||com/google/gwt/core/client/impl/SchedulerImpl.java#76::execute|||com/google/gwt/core/client/impl/SchedulerImpl.java#140::execute|||com/google/gwt/core/client/impl/Impl.java#244::apply|||com/google/gwt/core/client/impl/Impl.java#283::entry0|||#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Windows NT 6.2 WOW64) AppleWebKit/538.1 (KHTML, like Gecko) rstudio Safari/538.1 Qt/5.4.1
17 Jul 2018 18:15:38 [rsession-wilkinson_r] ERROR system error 109 (The pipe has been ended); OCCURRED AT: virtual void rstudio::session::NamedPipeHttpConnection::close() C:\Users\Administrator\rstudio\src\cpp\session\http\SessionNamedPipeHttpConnectionListener.hpp:198; LOGGED FROM: virtual void rstudio::session::NamedPipeHttpConnection::close() C:\Users\Administrator\rstudio\src\cpp\session\http\SessionNamedPipeHttpConnectionListener.hpp:198
17 Jul 2018 18:22:51 [rsession-wilkinson_r] ERROR Failed to parse JSON: '#!json: {"package":"shiny","exports":["dataTableOutput","ins...'; LOGGED FROM: virtual void rstudio::session::modules::r_packages::AsyncPackageInformationProcess::onCompleted(int) C:\Users\Administrator\rstudio\src\cpp\session\modules\SessionAsyncPackageInformation.cpp:205


#8

Based on the diagnostics report, it seems that the file (named pipe) that RStudio uses for communication is getting unexpectedly shut down or closed. We've seen this on rare occasion with certain antiviruses, or with some over-aggressive firewalls.

If you have an antivirus or firewall enabled, can you try temporarily disabling each and see if that helps?

We're also considering moving away from named pipes for communication in RStudio v1.2. Because of that, you might have better luck with the RStudio preview release. If you have time, can you try installing that and let us know if the situation seems better there?


#9

Hello Kevin,

I tried temporarily disabling my antivirus software. It made no difference. Firewalls are managed enterprise wide here, so I cannot control that.

The thing is, I have a laptop computer in the same enterprise environment and configured like the desktop computer where I am having the problem. RStudio works fine on the laptop. Obviously something is different, but I don’t have any idea what.

I will try installing the preview release you reference below and see if that works on the computer with the problem.

--Ron


#10

Hello Kevin,

I tried installing the pre-release RStudio v1.2. Same problem, unfortunately.

--Ron


#11

Shoot, sorry to hear it. Next thing worth trying is resetting your RStudio state.


#12

Resetting RStudio Desktop’s state did the trick! Thanks!

--Ron