RStudio crash on dplyr

crash-report

#1

Hi All,

I have a question about RStudio. Is it normal that whole RStudio crash when in not existing variable is called in mutate? I have noticed the same behavior for example when I am selecting not existing variable.
Developing code with such problems is very hard. In some sense, I am not able to make mistakes because of this cost me a lot.
Can I do something about this?

An example:

library(dplyr)
iris%>%
  filter(a)

Produce an error: R session aborted. The session was terminated.

Thanks,
D.


#2

Hi there - no, this is not normal behavior. If you attempt to filter by a non-existent variable, you should get an error along the lines of:

Error in filter_impl(.data, quo) : 
  Evaluation error: object 'a' not found.

In order to help you determine the reason for your crash, can you please generate an RStudio diagnostics report? Also, here are some instructions for finding crash reports and application logs.

Can you please also share your basic system info and sessionInfo()?


#3
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.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.5/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.5.0 tools_3.5.0

#4
[1] "1.2.830"

$R
[1] "/usr/local/bin/R"

$pdflatex
[1] "/Library/TeX/texbin/pdflatex"

$bibtex
[1] "/Library/TeX/texbin/bibtex"

$gcc
[1] "/usr/bin/gcc"

$git
[1] "/usr/bin/git"

$svn
[1] "/usr/bin/svn"

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.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.5/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.5.0 tools_3.5.0   

SysInfo:
                                                                                          sysname 
                                                                                         "Darwin" 
                                                                                          release 
                                                                                         "17.7.0" 
                                                                                          version 
"Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64" 
                                                                                         nodename 
                                                                        "wrousername__.local" 
                                                                                          machine 
                                                                                         "x86_64" 
                                                                                            login 
                                                                                 "username__" 
                                                                                             user 
                                                                                 "username__" 
                                                                                   effective_user 
                                                                                 "username__" 

R Version:
               _                           
platform       x86_64-apple-darwin15.6.0   
arch           x86_64                      
os             darwin15.6.0                
system         x86_64, darwin15.6.0        
status                                     
major          3                           
minor          5.0                         
year           2018                        
month          04                          
day            23                          
svn rev        74626                       
language       R                           
version.string R version 3.5.0 (2018-04-23)
nickname       Joy in Playing              
$`__CF_USER_TEXT_ENCODING`
[1] "0x20D88C82:0x0:0x0"

$Apple_PubSub_Socket_Render
[1] "/private/tmp/com.apple.launchd.7zdKgYxvXG/Render"

$CLICOLOR_FORCE
[1] "1"

$COMMAND_MODE
[1] "unix2003"

$DISPLAY
[1] "/private/tmp/com.apple.launchd.OTPZk6ntjV/org.macosforge.xquartz:0"

$DYLD_FALLBACK_LIBRARY_PATH
[1] "/Library/Frameworks/R.framework/Resources/lib:/Users/username__/lib:/usr/local/lib:/usr/lib:::/lib:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server"

$EDITOR
[1] "vi"

$GIT_ASKPASS
[1] "rpostback-askpass"

$HOME
[1] "/Users/username__"

$LANG
[1] "en_US.UTF-8"

$LC_CTYPE
[1] "en_US.UTF-8"

$LN_S
[1] "ln -s"

$LOGNAME
[1] "username__"

$MAKE
[1] "make"

$PAGER
[1] "/usr/bin/less"

$PATH
[1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/usr/local/hadoop-2.7.0/bin:/usr/local/hadoop/bin:/opt/X11/bin:/usr/local/spark/bin:/usr/local/spark/python:/opt/local/bin"

$R_BROWSER
[1] "/usr/bin/open"

$R_BZIPCMD
[1] "/usr/bin/bzip2"

$R_DOC_DIR
[1] "/Library/Frameworks/R.framework/Resources/doc"

$R_GZIPCMD
[1] "/usr/bin/gzip"

$R_HOME
[1] "/Library/Frameworks/R.framework/Resources"

$R_INCLUDE_DIR
[1] "/Library/Frameworks/R.framework/Resources/include"

$R_LIBS_SITE
[1] ""

$R_LIBS_USER
[1] "~/Library/R/3.5/library"

$R_PAPERSIZE
[1] "a4"

$R_PDFVIEWER
[1] "/usr/bin/open"

$R_PLATFORM
[1] "x86_64-apple-darwin15.6.0"

$R_PRINTCMD
[1] "lpr"

$R_QPDF
[1] "/Library/Frameworks/R.framework/Resources/bin/qpdf"

$R_RD4PDF
[1] "times,inconsolata,hyper"

$R_SESSION_TMPDIR
[1] "/var/folders/43/c8s0nxkx6wj8xm4r9nrs6xrwhdj342/T//Rtmp5ztqy7"

$R_SHARE_DIR
[1] "/Library/Frameworks/R.framework/Resources/share"

$R_SYSTEM_ABI
[1] "osx,gcc,gxx,gfortran,?"

$R_TEXI2DVICMD
[1] "/usr/local/bin/texi2dvi"

$R_UNZIPCMD
[1] "/usr/bin/unzip"

$R_ZIPCMD
[1] "/usr/bin/zip"

$RMARKDOWN_MATHJAX_PATH
[1] "/Applications/RStudio.app/Contents/Resources/resources/mathjax-26"

$RS_PPM_FD_READ
[1] "17"

$RS_PPM_FD_WRITE
[1] "18"

$RS_RPOSTBACK_PATH
[1] "/Applications/RStudio.app/Contents/MacOS/rpostback"

$RS_SHARED_SECRET
[1] "168072824752491622650073"

$RSTUDIO
[1] "1"

$RSTUDIO_CONSOLE_COLOR
[1] "256"

$RSTUDIO_CONSOLE_WIDTH
[1] "155"

$RSTUDIO_PANDOC
[1] "/Applications/RStudio.app/Contents/MacOS/pandoc"

$RSTUDIO_SESSION_PORT
[1] "38500"

$RSTUDIO_USER_IDENTITY
[1] "username__"

$RSTUDIO_WINUTILS
[1] "bin/winutils"

$SED
[1] "/usr/bin/sed"

$SHELL
[1] "/bin/bash"

$SSH_ASKPASS
[1] "rpostback-askpass"

$SSH_AUTH_SOCK
[1] "/private/tmp/com.apple.launchd.GUohPn8GD0/Listeners"

$TAR
[1] "/usr/bin/tar"

$TERM
[1] "xterm-256color"

$TMPDIR
[1] "/var/folders/43/c8s0nxkx6wj8xm4r9nrs6xrwhdj342/T/"

$USER
[1] "username__"

$XPC_FLAGS
[1] "0x0"

$XPC_SERVICE_NAME
[1] "0"

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

19 Dec 2017 14:27:03 [rdesktop] ERROR system error 60 (Operation timed out); OCCURRED AT: rstudio::core::Error rstudio::core::waitWithTimeout(const boost::function<WaitResult ()> &, int, int, int) /Users/rstudio/rstudio/src/cpp/core/WaitUtils.cpp:63; LOGGED FROM: void rstudio::desktop::SessionLauncher::launchNextSession(bool) /Users/rstudio/rstudio/src/cpp/desktop-mac/SessionLauncher.mm:188
30 Mar 2018 09:52:53 [rdesktop] ERROR system error 100 (Protocol error) [description=Unable to parse version from R, version-info=, r-error=Fatal error: unable to open the base package||||||]; OCCURRED AT: rstudio::core::Error rstudio::core::r_util::rVersion(const rstudio::core::FilePath &, const rstudio::core::FilePath &, const std::string &, std::string *) /Users/rstudio/rstudio/src/cpp/core/r_util/REnvironmentPosix.cpp:784; LOGGED FROM: bool rstudio::core::r_util::detectREnvironment(const rstudio::core::FilePath &, const rstudio::core::FilePath &, const std::string &, std::string *, std::string *, EnvironmentVars *, std::string *) /Users/rstudio/rstudio/src/cpp/core/r_util/REnvironmentPosix.cpp:678
18 Jun 2018 09:20:46 [rdesktop] ERROR Main window closed unexpectedly; LOGGED FROM: auto rstudio::desktop::MainWindow::closeEvent(QCloseEvent *)::(anonymous class)::operator()(QVariant) const /Users/vagrant/workspace/IDE/macos/src/cpp/desktop/DesktopMainWindow.cpp:240
01 Aug 2018 14:04:07 [rdesktop] ERROR Main window closed unexpectedly; LOGGED FROM: auto rstudio::desktop::MainWindow::closeEvent(QCloseEvent *)::(anonymous class)::operator()(QVariant) const /Users/vagrant/workspace/IDE/macos/src/cpp/desktop/DesktopMainWindow.cpp:270

Log file: rsession-username__.log

#5

Do you see this crash if you just try running R from the terminal, rather than within RStudio?