create chunk with shortcut (ctrl alt i) and then paste (ctrl v) causes Rstudio to freeze

Hi, I'd like to report a bug that seems to persist across two different laptops, different documents and different RStudio versions.

To recreate: open any .Rmd file, press ctrl + alt + i to create new chunk, press ctrl + v to past something (usually some code I want to modify). My Rstudio becomes unresponsive and I can no longer type or close Rstudio without opening task manager.

I'm using RStudio 1.3.820, Windows 10. This also happened with 1.2.xx versions too

I'm also on Windows 10 and I can't reproduce your problem, could you share a sample .Rmd and content to paste with Ctrl+v that reproduces your issue?

Ok, hopefully this is a more reliable way to reproduce the bug for you:

  • Create a new .Rmd from the menu (I use the little icon, but both 'work')
  • Click OK (all default)
  • Go to line 29
  • press ctrl+alt+i
  • type:
blah %>%
  mutate(blah = blah) %>%
  filter(x != y)
  • select with mouse, press ctrl + c

  • click line 35

  • press ctrl+alt+i

  • press ctrl + v.

Cursor still flickers, but can no longer do anything in R.

This breaks Rstudio around ~ 75% of time. If it doesn't break, then press ctrl + alt + i, and paste again... eventually it breaks for me.

Ok now I can confirm this is reproducible, but for me, it only crashes if you paste when the cursor is not visible (without scrolling to the bottom of the .Rmd file).

Session Info

sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

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

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

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

I think you should file an issue on the GitHub repo and link back to this topic

Done!

it only crashes if you paste when the cursor is not visible (without scrolling to the bottom of the .Rmd file).

This doesn't seem to be the case for me. Cursor visible or not doesn't seem to effect me.

1 Like