Control-Enter running code out of order

I'm using RStudio 1.4.1103 on Windows 10 with R 4.0.3. I quite often use Ctrl-Enter to step through scripts interactively. Recently, I've noticed that sometimes the lines of code end up being run out of order if I press Ctrl-Enter repeatedly. I'm not sure when this started occurring, but I wasn't aware of this occurring until the last couple of months and I expect may reflect a relatively recent change in RStudio.

Possibly relevant observations:

  1. Occurs both within .Rmd and .R files
  2. Not consistently reproducible, but currently happening at least once a day
  3. Selecting a bunch of lines and then pressing Ctrl-Enter does not cause a problem
  4. Similarly, waiting for each line to finish executing before pressing Ctrl-Enter does not cause a problem
  5. Not sure if this is relevant, but my current working directory is usually a networked folder (but that's nothing new)

The most obvious side effect of this is when a line executes out of order that relies on an object being created from the previous step, but sometimes it's subtler than that, particularly if an older version of the object already exists in the global environment.

This is a known issue that was introduced in RStudio 1.4. We'll be releasing a new version that has a fix early next week, but if you can't wait, there's a preview release here:

Thanks @jonathan. For future reference, is there a 'known issues' section I could have found this before posting?

Yes - issues within the github repo at https://github.com/rstudio/rstudio/issues. We're happy for the community to participate in the issues logged against the RStudio desktop IDE, including logging issues, providing reprexes (reproducible examples), upvoting issues, etc. Many thanks for your contributions!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.