RStudio v1.1 crashes - "Unable to establish connection with R session"

bug
rstudio
mac

#1

Since I’ve installed RStudio v1.1, that I get the message “Session Terminated/Aborted”, but only on one project. In the beginning I thought that it was related to a package or so, but it happened after a couple of seconds of opening RStudio, even before loading any packages.

Tried to reset .Rdata and .Rhistory files, without success, but as I disabled the Git option from the preferences, I never had the issue again. However enabling it back, it crashes RStudio.

Any idea of what could be happening?

My logs show this:

12 Oct 2017 16:14:39 [rsession-Fil] CLIENT EXCEPTION (rsession-Fil): (TypeError) : undefined is not an object (evaluating 'this.a.a.r.row');|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:10184/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh  Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko)
12 Oct 2017 16:14:39 [rsession-Fil] CLIENT EXCEPTION (rsession-Fil): (TypeError) : undefined is not an object (evaluating 'this.a.a.r.row');|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:10184/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh  Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko)
12 Oct 2017 16:14:40 [rsession-Fil] CLIENT EXCEPTION (rsession-Fil): (TypeError) : undefined is not an object (evaluating 'this.a.a.r.row');|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:10184/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh  Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko)
> sessionInfo()
R version 3.4.2 RC (2017-09-21 r73344)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

#2

What’s your exact RStudio version? If you’re running a daily build, you might try upgrading to the release build (1.1.383) as this sounds similar to a bug we fixed shortly before release.


#3

Forgot to include that, sorry. But I’m currently using version 1.1.383, which is the latest available. Is there something else I could test or send you to help diagnosing the issue?


#4

Something else that happens is that I get a “Can’t establish connection with RStudio session” error. Not sure if it’s relevant to this issue or not but I assume that it might be.
I’ve noticed as well, that the issue happens more frequently when I deal with large datasets. This never happened with previous versions but as soon as my rsession process on the activity monitor, goes above 600mb, I see this happening. Previous RStudio versions never gave me any problems.


#5

I encounter the exact same behavior with RStudio 1.1.383.

In my case it is also related to one project and the crash occurs as soon as I try to save a file. The log:

CLIENT EXCEPTION (TypeError) : undefined is not an object (evaluating ‘this.a.a.r.row’);|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:44586/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko)

In addition, I also get the “Error - Unable to establish connection with R session” message on seemingly random events.


#6

@leiendeckerlu are you using the data.table package? And if yes which version.
Also, did RStudio ever crash without having any packages loaded?

@jonathan any news on your side?


#7

@Filipe yes, the data.table package is part of my environment…

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages:
[1] org.Hs.eg.db_3.4.1 AnnotationDbi_1.38.2 IRanges_2.10.5 S4Vectors_0.14.7 Biobase_2.36.2
[6] BiocGenerics_0.22.1 readr_1.1.1 biomaRt_2.32.1 sleuth_0.29.0 dplyr_0.7.4
[11] ggplot2_2.2.1

loaded via a namespace (and not attached):
[1] Rcpp_0.12.13 compiler_3.4.2 plyr_1.8.4 bindr_0.1 bitops_1.0-6
[6] tools_3.4.2 digest_0.6.12 bit_1.1-12 RSQLite_2.0 memoise_1.1.0
[11] tibble_1.3.4 gtable_0.2.0 pkgconfig_2.0.1 rlang_0.1.2 DBI_0.7
[16] yaml_2.1.14 bindrcpp_0.2 knitr_1.17 hms_0.3 bit64_0.9-7
[21] grid_3.4.2 glue_1.1.1 data.table_1.10.4-2 R6_2.2.2 XML_3.98-1.9
[26] blob_1.1.0 magrittr_1.5 scales_0.5.0 assertthat_0.2.0 colorspace_1.3-2
[31] RCurl_1.95-4.8 lazyeval_0.2.0 munsell_0.4.3

And no, as far as I can remember, it only always crashed after loading libraries…


#8

@leiendeckerlu my suggestion is to try to remove the package completely, and try to install either version 1.10.4 or the new 1.10.5. I had the same problem and scaling back to 1.10.4 solved it for now. I’m still not sure from which side is the problem coming from, as data.table says it’s RStudio’s fault and RStudio says it’s data.table’s fault.
However those two versions seem to be more stable than the 1.10.4-1 and 1.10.4-2 where I always say the problem after loading the package.


#9

@Filipe Will try that, thank you!
I just found this commit https://github.com/Rdatatable/data.table/commit/9d1f3e29d6daf44ecc571153b8b383858c5d9ed1 which might be part of what we’re seeing.

I will let you know how it went


#10

Second’ing this. I’m using R 3.4.2, RStudio 1.1.383, and data.table 1.10.4-2 and RStudio crashes on me multiple times per day.

Use the following to update data.table to the development version. (Currently 1.10.5 which has a patch for the bug.)

remove.packages("data.table")
install.packages("data.table", type = "source", repos = "http://Rdatatable.github.io/data.table")

#11

@neb did you ever end up solving the problem with the data.table package?
I’m currently working on a package so I didn’t want to risk installing RStudio 1.1 or data.table 1.10.5.


#12

Yes, installing the dev version of data.table solved it for me.


#13

@Filipe same here. 1.10.5 solved it!


#14

I’m having the same or similar error, but unrelated to the data.table package. I get this error without loading any package. Tried reinstalling RStudio (version 1.1.383) and R (3.4.2), did not help.

Here’s the log output:

(TypeError) : undefined is not an object (evaluating ‘this.a.a.r.row’);|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:46289/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh Intel Mac OS X 10_12_6) AppleWebKit/604.3.5 (KHTML, like Gecko)

And sessionInfo():

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2 yaml_2.1.14


#15

@ouzor When does it really happen? Is it random, or after running a certain script? I’m asking because I thought as well to be random, to then find that it was being caused by data.table. I wasn’t even aware the package was being loaded, until I started excluding packages one by one.


#16

I’ve been trying to identify this, but the behaviour is very strange. Sometimes it happens when reading stuff with readRDS or writing with saveRDS, sometimes when I just edit scripts and don’t execute any code. But it does happen only with a specific project, so that hints that it might be related to some specific package… Very confusing and annoying :confused:


#17

@ouzor I would strongly recommend to remove the data.table package. It might be that it has been installed by another package or so, and that is what’s causing this problem.
The readRDS and saveRDS shouldn’t be a problem as it’s part of the base packages.


#18

Hi @Felipe, thanks a lot for the tip! I wasn’t aware having installed data.table (it was installed by qgraph apparently), and indeed removing the package, or installing the latest version from CRAN (1.10.4-3) seems to have fixed the problem!


#19

I started encountering a similar problem in October and it hasn’t died down since. I have updated R and RStudio, I have removed data.table and updated all other packages, but I keep getting confronted with this error every few seconds:

RStudio can do this anytime I executive code, browse my files or type code (because it will throw this error looking for completion suggestions). If I try the action a second time after the error, usually it will go through.

Error from logs:

20 Nov 2017 12:10:19 [rsession-mennoschellekens] CLIENT EXCEPTION (rsession-mennoschellekens): (TypeError) : undefined is not an object (evaluating 'this.a.a.r.row');|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:43039/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh  Intel Mac OS X 10_13) AppleWebKit/604.1.38 (KHTML, like Gecko)
20 Nov 2017 12:10:20 [rsession-mennoschellekens] CLIENT EXCEPTION (rsession-mennoschellekens): (TypeError) : undefined is not an object (evaluating 'this.a.a.r.row');|||org/rstudio/studio/client/workbench/views/source/editors/text/r/SignatureToolTipManager.java#134::execute|||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|||http://127.0.0.1:43039/#-1::anonymous|||com/google/gwt/cell/client/AbstractEditableCell.java#41::viewDataMap|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh  Intel Mac OS X 10_13) AppleWebKit/604.1.38 (KHTML, like Gecko)

Thank you!


#20

@mhschel I would start a new post for this issue, as this is not the same error I posted initially. However it seems to be related to shiny or GitHub. Do you have any of those 2?