Repository navigation
Description
System details
RStudio Edition : Desktop
RStudio Version : 2025.05.0+496
Platform : aarch64-apple-darwin20
OS Version : MacOS 15.4.1 (24E263)
R Version : 4.5.0
Steps to reproduce the problem
In an R Markdown file, with the global RStudio option Console -> "Discard pending console input on error" enabled, run a block of code causing an error (example of an undefined object below). The first part of the error message is meaningful, followed by additional lines seemingly unrelated to the initial error.
Error: object 'AAA' not found
Error during wrapup: not that many frames on the stack
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Most notably, subsequent lines of code continue to be executed after the error, despite the global option to stop execution.
Describe the problem in detail
No further text.
Describe the behavior you expected
Execution should be stopped after the error message, i.e., following the global option to "Discard pending console input on error". The option applies when executing from an R code file, whereas in R Markdown, this is not the case. Furthermore, the generated error message (see above) is unclear to me, but may explain the encountered behavior.
Before the update to RStudio 2025-04-11, R Markdown execution also halted on errors for me. Therefore, I assume the change in behavior is caused by the recent update and changes related to alternative display for R errors, warnings, and messages (#2574).
I don't know if this is a bug or an intended change in (default) behavior, but the global option not applying to R Markdown files is unexpected.
QA Notes
Once you have opened a PR, add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the original description.
- I have read the guide for submitting good bug reports.
- I have installed the latest version of RStudio, and confirmed that the issue still persists.
- If I am reporting an RStudio crash, I have included a diagnostics report.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
Activity
ronblum commentedon May 9, 2025
@HaHeho Thank you for raising this! I can reproduce this, and it's a regression as it worked in RStudio version 2024.12.1+563. As far as I can tell, this happens whether or not the option is enabled?
HaHeho commentedon May 9, 2025
Yes, in R Markdown the option seems to be ignored (i.e. always off). In R Script the option applies correctly.
ronblum commentedon May 9, 2025
@HaHeho Thank you for the added info! I've marked this issue review.
HaHeho commentedon May 9, 2025
Link to the discussion of additional (seemingly unrelated) lines in all error messages in #16002.
And a link to a possibly related issue with the command history of erroneous code lines in R Markdown in #16006.
ronblum commentedon May 15, 2025
Verified in RStudio Desktop 2025.05.1+502 on Windows 11. Checked
HaHeho commentedon May 16, 2025
Glad to see this and other issues with the latest release being fixed quickly. Will there be another release soon? Alternatively, how to convenient get a version with the fixes without having to build the project myself (I'm used to installing via homebrew on MacOS)?
kevinushey commentedon May 16, 2025
Daily builds are published at https://dailies.rstudio.com/, and the daily builds for the next patch release specifically are published at https://dailies.rstudio.com/rstudio/mariposa-orchid/. The builds you see there will eventually become the upcoming patch release (after we get all the requisite fixes in, and have appropriately tested everything.)
We don't have a timeline for the patch yet, but I think our goal is to get it out in the next week or so.