Repository navigation
Closed
Labels
bugan unexpected problem or unintended behavior
Description
Any time I attempt to run rmarkdown::render_site() in radian in vscode (on windows), the terminal crashes with this message:
The terminal process "C:\Users\walki\AppData\Local\Programs\Python\Python39\Scripts\radian.exe '--no-save', '--no-restore'" terminated with exit code: 3221225725.
Radian also crashes (with render_site function) when running outside of vscode.
Running render_site() using R.exe in vscode terminal works fine, my site renders with no problems.
I've mentioned this problem on randy3k/radian.
I attempted using debug to trace down the problematic call, but was just making blind guesses, I'll copy the where: output here in case its helpful:
where 1: same_path(dir, file.path(dir, ".."))
where 2: proj_root(input, "^index.R?md$", "^\\s*site:.*::.*$")
where 3: doTryCatch(return(expr), name, parentenv, handler)
where 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 5: tryCatchList(expr, classes, parentenv, handlers)
where 6: tryCatch(proj_root(input, "^index.R?md$", "^\\s*site:.*::.*$"),
error = function(e) NULL)
where 7: site_generator(input, output_format)
where 8: rmarkdown::render_site()
Output of xfun::session_info()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042), RStudio 0
Locale:
LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
LC_TIME=English_United States.1252
Package version:
base64enc_0.1.3 bslib_0.3.1 digest_0.6.29 evaluate_0.15 fastmap_1.1.0 fs_1.5.2 glue_1.6.2 graphics_4.1.2 grDevices_4.1.2 highr_0.9
htmltools_0.5.2 jquerylib_0.1.4 jsonlite_1.8.0 knitr_1.38 magrittr_2.0.2 methods_4.1.2 R6_2.5.1 rappdirs_0.3.3 rlang_1.0.2 rmarkdown_2.13
sass_0.4.1 stats_4.1.2 stringi_1.7.6 stringr_1.4.0 tinytex_0.37 tools_4.1.2 utils_4.1.2 xfun_0.30 yaml_2.3.5
Pandoc version: 2.17.1.1
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavior
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]running `rmarkdown::render_site()` crashes radian in vscode on windows[/-][+]running `rmarkdown::render_site()` crashes radian on windows[/+]cderv commentedon Mar 28, 2022
Thanks for the report. I can reproduce this.
At some point, this is called , which cause a C stack limit outside of radian
I am surprised that this happens -
rmarkdown::render_site()does not error the same inside RStudiocderv commentedon Mar 28, 2022
In fact I can sometime reproduce inside R and RStudio too... not sure when this infinite loop of
proj_root()was introduced...@yihui does this happen to you also on Mac ?
yihui commentedon Mar 28, 2022
I just pushed a fix for the problem in
rmarkdown:::proj_root('.', "^index.R?md$", "^\\s*site:.*::.*$"). Not sure if that would fix the original radian issue, though. @fisher-j We can re-open and investigate further if the dev version of rmarkdown still doesn't work for you. Thanks!cderv commentedon Mar 28, 2022
Thanks. I can confirm this is fixed with radian also and this was the issue.
I wonder where this comes from though - seems like an issue we would have found earlier.
yihui commentedon Mar 28, 2022
I was also a little surprised that we didn't find this bug earlier. Sounds like the infinite recursion inside
tryCatch()can crash radian more easily than RStudio? I don't know.cderv commentedon Mar 28, 2022
I was curious so looked futher. My tests showned that in RStudio IDE it seemed to work, but not in debug mode oddly. And in R console, it worked. It seems like
tryCatch()is correctly catching the issue... disturbing...So I really don't know what is causing the issue. I just know it happened when we removed rprojtoot use to add our own version (0ea439d). So I guess no other side effect to expect....
fisher-j commentedon Mar 28, 2022
Merge branch 'jg-devel'
github-actions commentedon Sep 27, 2022
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
dirname('.') returns '.', which will cause infinite recursion, so nor…