-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error for dirname receiving a non-character input on reperx that nearly crashes R #388
Comments
The error appears to be that Lines 94 to 111 in 945d63d
|
The root problem is that this error ( For some reason, the error caught in reprex is I think the only thing I can do in reprex is to throw a marginally more informative error. It is interesting to ask what's special about this error and whether some other package (evaluate? knitr?) or R itself could do something differently to allow it to be knit. If I surround the tricky code with e <- new.env()
attr(e, "e") <- e
blah <- tryCatch(
object.size(e),
error = function(e) e
)
blah
#> <simpleError: C stack usage 7969228 is too close to the limit>
str(blah)
#> List of 2
#> $ message: chr "C stack usage 7969228 is too close to the limit"
#> $ call : NULL
#> - attr(*, "class")= chr [1:3] "simpleError" "error" "condition" Created on 2021-11-01 by the reprex package (v2.0.1.9000) cc @cderv |
Thanks Jenny for the ping. It seems this error (type of error) is not catched the same as other by evaluate > evaluate::evaluate("stop('a')")
[[1]]
$src
[1] "stop('a')"
attr(,"class")
[1] "source"
[[2]]
<simpleError in eval(expr, envir, enclos): a>
> evaluate::evaluate('e <- new.env()
+ attr(e, "e") <- e
+ object.size(e)')
Error: C stack usage 15922884 is too close to the limit So we should indeed look there. |
When trying to replicate a base R bug (https://bugs.r-project.org/show_bug.cgi?id=16441), I wanted to give a reprex for it. When trying to generate the reprex, there was an error in reprex.
That resulted in the following output on the R console.
This is with R 4.1.0 on Windows 10.
The text was updated successfully, but these errors were encountered: