# Console repeatedly getting stuck, not responding to any commands

Hi All, new user on the RStudio community but have been a long-time user of the program.

Starting a few days ago, I have been getting this issue that has been driving me absolutely crazy with the Rstudio console. I have no idea why it is happening, and the only way I've been able to 'fix' it is by ctrl+alt+del and then restarting.

Basically, I will work in RStudio and at some point the console seems to get stuck. As in, the cursor disappears and nothing I input into the console will go through. I can no longer save scripts, click through menu options, or even exit the program by x'ing out of the top right button.

It's like the console is stuck in a loop, but I have no loop in the current script I'm writing. There also no stop sign in the top right of the console to signify it's running logic. Task manager shows it's eating about about 25% of my cpu which seems high but it's not like its topping out or anything.

The timing of this seems completely random. Sometimes I can work on this script for an hour, sometimes for 5 minutes.

It seems like an internet connection could be involved. When I disconnect my ethernet cord I immediately get an "Error: Unable to establish connection with R session" error. This resets the console cursor, but as soon as I type another command the problem immediately reappears. Here's a screenshot to give an idea of what's happening.

As a background. I have the most recent version of R and RStudio. I've also tried this with the lastest RStudio preview and get the same issue. I've tried across two computers and the issue arises with both.

What would account for this type of behavior? I've been using R on and off for the better part of a decade and never had this issue before.

3 Likes

Sorry this issue persists.

Some system Information could be useful in helping diagnose these kinds of problems,


#### System Information:
- RStudio Edition: (Desktop or Server)
- RStudio Version:
- OS Version:
- R Version:

#### Also:
- RStudio diagnostics report: see rstd.io/support-diagnostics-report
- Your sessionInfo():
- RStudio application log files:  rstd.io/support-ide-log-files


Thank you very much for getting back to me.

After some more testing, this is almost certainly a problem with windows defender firewall. I didn't think this was the case originally as I had allowed R and RStudio to communicate through Windows Defender Firewall and was still having the issue.

However, I turned off my firewall completely last night and the issue hasn't reappeared since (about 5 hours work time). So certainly that's the case.

Long-term though, it's probably not a good idea to completely turn off my firewall. Is there something beyond RStudio and R that needs to be added to the exception list? I've also added 'Qt Qtwebengineprocess' and 'RStudio R Session' to the exception list but continued to have the same issue.

Running Version 1.2.5033 (desktop). Diagnostic report below.

[1] "1.2.5033"

$R [1] "C:\\PROGRA~1\\R\\R-36~1.3\\bin\\x64\\R.exe"$pdflatex
[1] ""

$bibtex [1] ""$gcc
[1] ""

$git [1] ""$svn
[1] ""

R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

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

other attached packages:
[1] tibble_3.0.0       foreign_0.8-75     Rfast_1.9.9        RcppZiggurat_0.1.5 Rcpp_1.0.4.6       stringr_1.4.0
[7] tidyr_1.0.2        haven_2.2.0        dplyr_0.8.5        ggthemes_4.2.0     ggplot2_3.3.0      openxlsx_4.1.4

loaded via a namespace (and not attached):
[1] zip_2.0.4        pillar_1.4.3     compiler_3.6.3   forcats_0.5.0    tools_3.6.3      lifecycle_0.2.0
[7] gtable_0.3.0     pkgconfig_2.0.3  rlang_0.4.5      cli_2.0.2        rstudioapi_0.11  parallel_3.6.3
[13] withr_2.1.2      vctrs_0.2.4      hms_0.5.3        grid_3.6.3       tidyselect_1.0.0 glue_1.4.0
[19] R6_2.4.1         fansi_0.4.1      purrr_0.3.3      magrittr_1.5     scales_1.1.0     ellipsis_0.3.0
[25] assertthat_0.2.1 colorspace_1.4-1 utf8_1.1.4       stringi_1.4.6    munsell_0.5.0    crayon_1.3.4

SysInfo:
sysname           release           version          nodename           machine             login
"Windows"          "10 x64"     "build 18363" "DESKTOP-9ADNHCT"          "x86-64"           "marxc"
user    effective_user
"marxc"           "marxc"

R Version:
_
platform       x86_64-w64-mingw32
arch           x86_64
os             mingw32
system         x86_64, mingw32
status
major          3
minor          6.3
year           2020
month          02
day            29
svn rev        77875
language       R
version.string R version 3.6.3 (2020-02-29)
nickname       Holding the Windsock
$__COMPAT_LAYER [1] "RunAsAdmin"$ALLUSERSPROFILE
[1] "C:\\ProgramData"

$APPDATA [1] "C:\\Users\\marxc\\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

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

$DriverData [1] "C:\\Windows\\System32\\Drivers\\DriverData"$GFORTRAN_STDERR_UNIT
[1] "-1"

$GFORTRAN_STDOUT_UNIT [1] "-1"$HOME
[1] "C:\\Users\\marxc\\Documents"

$HOMEDRIVE [1] "C:"$HOMEPATH
[1] "\\Users\\marxc"

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

$MPLENGINE [1] "tkAgg"$MSYS2_ENV_CONV_EXCL
[1] "R_ARCH"

$NUMBER_OF_PROCESSORS [1] "8"$OneDrive
[1] "C:\\Users\\marxc\\OneDrive"

$OneDriveConsumer [1] "C:\\Users\\marxc\\OneDrive"$OS
[1] "Windows_NT"

$PATH [1] "C:\\Program Files\\R\\R-3.6.3\\bin\\x64;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Users\\marxc\\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 126 Stepping 5, GenuineIntel"

$PROCESSOR_LEVEL [1] "6"$PROCESSOR_REVISION
[1] "7e05"

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

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

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

$QT_D3DCREATE_MULTITHREADED [1] "1"$R_ARCH
[1] "/x64"

$R_COMPILED_BY [1] "gcc 4.9.3"$R_DOC_DIR
[1] "C:/PROGRA~1/R/R-36~1.3/doc"

$R_HOME [1] "C:/PROGRA~1/R/R-36~1.3"$R_LIBS_USER
[1] "C:/Users/marxc/Documents/R/win-library/3.6"

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

$RS_LOCAL_PEER [1] "\\\\.\\pipe\\29465-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] "29465"$RSTUDIO_USER_IDENTITY
[1] "marxc"

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

$SystemRoot [1] "C:\\WINDOWS"$TEMP
[1] "C:\\Users\\marxc\\AppData\\Local\\Temp"

$TERM [1] "xterm-256color"$TMP
[1] "C:\\Users\\marxc\\AppData\\Local\\Temp"

$USERDOMAIN [1] "DESKTOP-9ADNHCT"$USERDOMAIN_ROAMINGPROFILE

$USERNAME [1] "marxc"$USERPROFILE
[1] "C:\\Users\\marxc"

\$windir
[1] "C:\\WINDOWS"

[1] ".GlobalEnv"           "package:tibble"       "package:foreign"      "package:Rfast"        "package:RcppZiggurat"
[6] "package:Rcpp"         "package:stringr"      "package:tidyr"        "package:haven"        "package:dplyr"
[11] "package:ggthemes"     "package:ggplot2"      "package:openxlsx"     "tools:rstudio"        "package:stats"
[16] "package:graphics"     "package:grDevices"    "package:utils"        "package:datasets"     "package:methods"
Log file: rdesktop.log
--------------------------------------------------

(Empty)

Log file: rsession-marxc.log
--------------------------------------------------

09 Apr 2020 20:47:21 [rsession-marxc] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
10 Apr 2020 18:57:35 [rsession-marxc] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116



As an update, this problem continues to persist. I humbly ask if anyone has the ability to help to do so.

Turning off windows defender has lessened the issue, but it still occurs. After further trouble shooting, it might have something to do with tab-completion. It seems to always happen when I am writing and there is a tab-complete box. It never occurs when I am actually executing code (i.e. not writing anything).

I would greatly appreciate any advice into this ongoing bug.

Should be the final update on this. I've found the root of the problem and wanted to self-answer for any poor sacks who might get into the same situation as me.

I have a script that is sourced at the beginning of all my work with libraries to load in. About 2 weeks ago I added Rfast for a single function and it appears it doesn't work with dplyr.

After realizing RStudio froze everytime I was writing, and specifically everytime I was using a dplyr function, I tried loading ONLY dplyr and sure enough the problem went away. At that point it was just a matter of loading packages from my list and testing a dplyr function until RStudio froze. Package Rfast was the culprit and as long as I don't load that I have zero issues.

I know this isn't an RStudio problem, but wanted to give an answer regardless for anyone else having that problem. I've never had packages break each other before, so it was a very unique situation for me. If there's another place anyone recommends to pass this problem along, I'd be happy to help the community in any way.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.