Skip to content
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

roxygenize() leading to C stack reaching limit #486

Closed
cdeterman opened this issue Jun 27, 2016 · 1 comment
Closed

roxygenize() leading to C stack reaching limit #486

cdeterman opened this issue Jun 27, 2016 · 1 comment

Comments

@cdeterman
Copy link

When I run roxygenize() I get the error:

Error: C stack usage 7971312 is too close to the limit

When I run traceback() I get:

...
25: as.vector(x, mode)
24: as.vector(x, mode)
23: as.vector(x, mode)
22: as.vector(x, mode)
21: as.vector(x, "character")
20: as.vector(x, "character")
19: as.character.default(x$value@defined)
18: as.character(x$value@defined)
17: format_name(name)
16: eval(expr, envir, enclos)
15: eval(arg, env)
14: escape(eval(arg, env))
13: FUN(X[[i]], ...)
12: lapply(args, function(arg) {
        if (is.character(arg)) 
            return(arg)
        escape(eval(arg, env))
    })
11: build_rd(format_name(name), "(", arglist, ")")
10: function_usage(x$value@generic, formals(x$value), s4method)
9: default_usage.s4method(partitum$object)
8: default_usage(partitum$object)
7: wrap_string(default_usage(partitum$object))
6: process_usage(block)
5: add_tag(rd, process_usage(block))
4: block_to_rd(block, base_path, parsed$env)
3: roc_process.rd_roclet(roc, parsed, base_path, options = options)
2: roxygen2:::roc_process(roc, parsed, base_path, options = options) at #6
1: roc_out(roclets[2])

where as.vector(x, mode) continues to be called repeatedly until the error is thrown. I have tried to track down where this is happening and it appears to be finally crashing on this file from the function roc_process function which I debug with debugonce(roxygen2:::roc_process.rd_roclet).
Running again I can watch it go through my files until the function below crashes where marked.

function (roclet, parsed, base_path, options = list()) 
{
    blocks <- Filter(function(x) length(x) > 1, parsed$blocks)
    topics <- list()
    for (block in blocks) {
        new <- block_to_rd(block, base_path, parsed$env) # CRASHES HERE!!!
        if (is.null(new)) 
            next
        old <- topics[[new$filename]]
        topics[[new$filename]] <- merge.rd_file(old, new$rd)
    }
    topics <- process_family(topics)
    topics <- process_inherit_params(topics)
    fix_params_order(topics)
}

I really don't know what is wrong with my roxygen comments as I thought it was relatively simple but perhaps I am overlooking something.

Thank you

@muschellij2
Copy link

Same as #475

@hadley hadley closed this as completed Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants