20

My RStudio crashed a number of times with the following error:

Error in (function (srcref) : unimplemented type (29) in 'eval'

The similarities where this has happened were:

  • I was working in a Markdown Notebook
  • I believe it was always when I selected the "Run all chunks above" command
  • I had run some code chunks in the current session before (so it wasn't upon starting work)

The error was always displayed just before the RStudio session aborted. I lose all my data and variables in the environment, but most of the code seems to be recoverable.

Anyone with an idea of what might cause this or how to deal with it?

Here my SessionInfo

R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

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

other attached packages:
 [1] data.table_1.12.8 forcats_0.5.0     stringr_1.4.0     dplyr_0.8.5       purrr_0.3.4       readr_1.3.1      
 [7] tidyr_1.0.2       tibble_3.0.0      ggplot2_3.3.0     tidyverse_1.3.0  

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6     cellranger_1.1.0 pillar_1.4.3     compiler_4.0.0   dbplyr_1.4.3     tools_4.0.0      packrat_0.5.0   
 [8] lubridate_1.7.8  jsonlite_1.6.1   lifecycle_0.2.0  nlme_3.1-147     gtable_0.3.0     lattice_0.20-41  pkgconfig_2.0.3 
[15] rlang_0.4.5      reprex_0.3.0     cli_2.0.2        DBI_1.1.0        rstudioapi_0.11  haven_2.2.0      xfun_0.13       
[22] withr_2.2.0      xml2_1.3.1       httr_1.4.1       knitr_1.28       fs_1.4.1         hms_0.5.3        generics_0.0.2  
[29] vctrs_0.2.4      grid_4.0.0       tidyselect_1.0.0 glue_1.4.0       R6_2.4.1         fansi_0.4.1      readxl_1.3.1    
[36] modelr_0.1.6     magrittr_1.5     backports_1.1.6  scales_1.1.0     ellipsis_0.3.0   rvest_0.3.5      assertthat_0.2.1
[43] colorspace_1.4-1 stringi_1.4.6    munsell_0.5.0    broom_0.5.6      crayon_1.3.4    

I sadly can't give you a reproducible example, but this is a screenshot of the last time it happened: enter image description here

And the next time following a fairly simple ggplot command: enter image description here

3
  • 1
    It's easier to help you if you include a simple reproducible example with sample input and desired output that can be used to test and verify possible solutions.
    – MrFlick
    May 18, 2020 at 4:06
  • 4
    You're absolutely spot on - a reproducible example would make this much easier! The problem is that this only occurs with otherwise normally working code - hence I can't reproduce the problem myself 100% of the time. It just happens every once in a while - mostly in situations as I described above. But I figured someone might be able to help me with the error message... May 18, 2020 at 14:03
  • 1
    Suggested fixes here to update RStudio community.rstudio.com/t/rstudio-crashes-when-debugging/47214/6. The discussion there is about debugging but I am getting the same error as @MoritzSchwarz not when debugging but just when doing Ctrl+Alt+S to run setup chunk, for example. May 21, 2020 at 14:24

1 Answer 1

21

You might try updating Rstudio.

I had similar messages that started to occur after I updated to version 4.0.0 of R. These errors were occurring with code that presented no problems on previous versions of R. I could run the code line by line with Ctrl-Enter with no error, but running the whole chunk would be a problem.

The issue went away when I updated Rstudio from Version 1.1.463 to 1.2.5042.

3
  • Thanks for the suggestion, but my RStudio is already on version 1.2.5033 and it tells me I'm already on the newest version... May 21, 2020 at 11:28
  • 1
    I'm having the same issue as the OP. I'm running RStudio Version 1.2.5001. I'm going to head over to community.rstudio.com and see if there's anything being discussed there. May 21, 2020 at 14:21
  • I am now on version 1.3.959 - and the problem has not occurred since. Updating was the obvious solution and I guess it was a matter of time until this was fixed. But it's reassuring to know that it was an RStudio issue rather than an independent issue. Therefore, I'll accept the answer as the correct one. Jun 15, 2020 at 12:32

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.