Error(s) in re-building vignettes:
  ...
--- re-building ‘intro_optic.Rmd’ using rmarkdown

 *** caught segfault ***
address 0x55b400000030, cause 'memory not mapped'

Traceback:
 1: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var),     as.character(value_var), args$attr_template, args$factorsAsStrings,     as.logical(valueAsFactor), as.logical(factor_key))
 2: gather.data.frame(., !!treat_var, treatment_date)
 3: tidyr::gather(., !!treat_var, treatment_date)
 4: purrr::transpose(treated)$policy_date %>% dplyr::bind_rows() %>%     tidyr::gather(!!treat_var, treatment_date)
 5: single_simulation$method_sample(single_simulation)
 6: run_iteration(single_simulation)
 7: doTryCatch(return(expr), name, parentenv, handler)
 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 9: tryCatchList(expr, classes, parentenv, handlers)
10: tryCatch({    run_iteration(single_simulation)}, error = function(e) {    e})
11: ...future.FUN(...future.X_jj, ...)
12: FUN(X[[i]], ...)
13: lapply(seq_along(...future.elements_ii), FUN = function(jj) {    ...future.X_jj <- ...future.elements_ii[[jj]]    assign(".Random.seed", ...future.seeds_ii[[jj]], envir = globalenv(),         inherits = FALSE)    ...future.FUN(...future.X_jj, ...)})
14: (function (...) {    ...future.globals.maxSize.org <- getOption("future.globals.maxSize")    if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {        oopts <- options(future.globals.maxSize = ...future.globals.maxSize)        on.exit(options(oopts), add = TRUE)    }    {        lapply(seq_along(...future.elements_ii), FUN = function(jj) {            ...future.X_jj <- ...future.elements_ii[[jj]]            assign(".Random.seed", ...future.seeds_ii[[jj]],                 envir = globalenv(), inherits = FALSE)            ...future.FUN(...future.X_jj, ...)        })    }})()
15: do.call(function(...) {    ...future.globals.maxSize.org <- getOption("future.globals.maxSize")    if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {        oopts <- options(future.globals.maxSize = ...future.globals.maxSize)        on.exit(options(oopts), add = TRUE)    }    {        lapply(seq_along(...future.elements_ii), FUN = function(jj) {            ...future.X_jj <- ...future.elements_ii[[jj]]            assign(".Random.seed", ...future.seeds_ii[[jj]],                 envir = globalenv(), inherits = FALSE)            ...future.FUN(...future.X_jj, ...)        })    }}, args = future.call.arguments)
16: eval(quote({    do.call(function(...) {        ...future.globals.maxSize.org <- getOption("future.globals.maxSize")        if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {            oopts <- options(future.globals.maxSize = ...future.globals.maxSize)            on.exit(options(oopts), add = TRUE)        }        {            lapply(seq_along(...future.elements_ii), FUN = function(jj) {                ...future.X_jj <- ...future.elements_ii[[jj]]                assign(".Random.seed", ...future.seeds_ii[[jj]],                   envir = globalenv(), inherits = FALSE)                ...future.FUN(...future.X_jj, ...)            })        }    }, args = future.call.arguments)}), new.env())
17: eval(quote({    do.call(function(...) {        ...future.globals.maxSize.org <- getOption("future.globals.maxSize")        if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {            oopts <- options(future.globals.maxSize = ...future.globals.maxSize)            on.exit(options(oopts), add = TRUE)        }        {            lapply(seq_along(...future.elements_ii), FUN = function(jj) {                ...future.X_jj <- ...future.elements_ii[[jj]]                assign(".Random.seed", ...future.seeds_ii[[jj]],                   envir = globalenv(), inherits = FALSE)                ...future.FUN(...future.X_jj, ...)            })        }    }, args = future.call.arguments)}), new.env())
18: eval(expr, p)
19: eval(expr, p)
20: eval.parent(substitute(eval(quote(expr), envir)))
21: base::local({    do.call(function(...) {        ...future.globals.maxSize.org <- getOption("future.globals.maxSize")        if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {            oopts <- options(future.globals.maxSize = ...future.globals.maxSize)            on.exit(options(oopts), add = TRUE)        }        {            lapply(seq_along(...future.elements_ii), FUN = function(jj) {                ...future.X_jj <- ...future.elements_ii[[jj]]                assign(".Random.seed", ...future.seeds_ii[[jj]],                   envir = globalenv(), inherits = FALSE)                ...future.FUN(...future.X_jj, ...)            })        }    }, args = future.call.arguments)})
22: base::withVisible(base::local({    do.call(function(...) {        ...future.globals.maxSize.org <- getOption("future.globals.maxSize")        if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {            oopts <- options(future.globals.maxSize = ...future.globals.maxSize)            on.exit(options(oopts), add = TRUE)        }        {            lapply(seq_along(...future.elements_ii), FUN = function(jj) {                ...future.X_jj <- ...future.elements_ii[[jj]]                assign(".Random.seed", ...future.seeds_ii[[jj]],                   envir = globalenv(), inherits = FALSE)                ...future.FUN(...future.X_jj, ...)            })        }    }, args = future.call.arguments)}))
23: base::withCallingHandlers({    ...future.value <- base::withVisible(base::local({        do.call(function(...) {            ...future.globals.maxSize.org <- getOption("future.globals.maxSize")            if (!identical(...future.globals.maxSize.org, ...future.globals.maxSize)) {                oopts <- options(future.globals.maxSize = ...future.globals.maxSize)                on.exit(options(oopts), add = TRUE)            }            {                lapply(seq_along(...future.elements_ii), FUN = function(jj) {                  ...future.X_jj <- ...future.elements_ii[[jj]]                  assign(".Random.seed", ...future.seeds_ii[[jj]],                     envir = globalenv(), inherits = FALSE)                  ...future.FUN(...future.X_jj, ...)                })            }        }, args = future.call.arguments)    }))    future::FutureResult(value = ...future.value$value, visible = ...future.value$visible,         rng = !identical(base::globalenv()$.Random.seed, ...future.rng),         globalenv = if (FALSE)             list(added = base::setdiff(base::names(base::.GlobalEnv),                 ...future.globalenv.names))        else NULL, started = ...future.startTime, version = "1.8")}, condition = base::local({    c <- base::c    inherits <- base::inherits    invokeRestart <- base::invokeRestart    length <- base::length    list <- base::list    seq.int <- base::seq.int    signalCondition <- base::signalCondition    sys.calls <- base::sys.calls    `[[` <- base::`[[`    `+` <- base::`+`    `<<-` <- base::`<<-`    sysCalls <- function(calls = sys.calls(), from = 1L) {        calls[seq.int(from = from + 12L, to = length(calls) -             3L)]    }    function(cond) {        is_error <- inherits(cond, "error")        ignore <- !is_error && !is.null(NULL) && inherits(cond,             NULL)        if (is_error) {            sessionInformation <- function() {                list(r = base::R.Version(), locale = base::Sys.getlocale(),                   rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(),                   search = base::search(), system = base::Sys.info())            }            ...future.conditions[[length(...future.conditions) +                 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame),                 cond$call), session = sessionInformation(), timestamp = base::Sys.time(),                 signaled = 0L)            signalCondition(cond)        }        else if (!ignore && TRUE && inherits(cond, c("condition",         "immediateCondition"))) {            signal <- TRUE && inherits(cond, "immediateCondition")            ...future.conditions[[length(...future.conditions) +                 1L]] <<- list(condition = cond, signaled = base::as.integer(signal))            if (TRUE && !signal) {                muffleCondition <- function (cond, pattern = "^muffle")                 {                  inherits <- base::inherits                  invokeRestart <- base::invokeRestart                  is.null <- base::is.null                  muffled <- FALSE                  if (inherits(cond, "message")) {                    muffled <- grepl(pattern, "muffleMessage")                    if (muffled)                       invokeRestart("muffleMessage")                  }                  else if (inherits(cond, "warning")) {                    muffled <- grepl(pattern, "muffleWarning")                    if (muffled)                       invokeRestart("muffleWarning")                  }                  else if (inherits(cond, "condition")) {                    if (!is.null(pattern)) {                      computeRestarts <- base::computeRestarts                      grepl <- base::grepl                      restarts <- computeRestarts(cond)                      for (restart in restarts) {                        name <- restart$name                        if (is.null(name))                           next                        if (!grepl(pattern, name))                           next                        invokeRestart(restart)                        muffled <- TRUE                        break                      }                    }                  }                  invisible(muffled)                }                muffleCondition(cond, pattern = "^muffle")            }        }        else {            if (TRUE) {                muffleCondition <- function (cond, pattern = "^muffle")                 {                  inherits <- base::inherits                  invokeRestart <- base::invokeRestart                  is.null <- base::is.null                  muffled <- FALSE                  if (inherits(cond, "message")) {                    muffled <- grepl(pattern, "muffleMessage")                    if (muffled)                       invokeRestart("muffleMessage")                  }                  else if (inherits(cond, "warning")) {                    muffled <- grepl(pattern, "muffleWarning")                    if (muffled)                       invokeRestart("muffleWarning")                  }                  else if (inherits(cond, "condition")) {                    if (!is.null(pattern)) {                      computeRestarts <- base::computeRestarts                      grepl <- base::grepl                      restarts <- computeRestarts(cond)                      for (restart in restarts) {                        name <- restart$name                        if (is.null(name))                           next                        if (!grepl(pattern, name))                           next                        invokeRestart(restart)                        muffled <- TRUE                        break                      }                    }                  }                  invisible(muffled)                }                muffleCondition(cond, pattern = "^muffle")            }        }    }}))
24: doTryCatch(return(expr), name, parentenv, handler)
25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
26: tryCatchList(expr, classes, parentenv, handlers)
27: base::tryCatch({    base::withCallingHandlers({        ...future.value <- base::withVisible(base::local({            do.call(function(...) {                ...future.globals.maxSize.org <- getOption("future.globals.maxSize")                if (!identical(...future.globals.maxSize.org,                   ...future.globals.maxSize)) {                  oopts <- options(future.globals.maxSize = ...future.globals.maxSize)                  on.exit(options(oopts), add = TRUE)                }                {                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {                    ...future.X_jj <- ...future.elements_ii[[jj]]                    assign(".Random.seed", ...future.seeds_ii[[jj]],                       envir = globalenv(), inherits = FALSE)                    ...future.FUN(...future.X_jj, ...)                  })                }            }, args = future.call.arguments)        }))        future::FutureResult(value = ...future.value$value, visible = ...future.value$visible,             rng = !identical(base::globalenv()$.Random.seed,                 ...future.rng), globalenv = if (FALSE)                 list(added = base::setdiff(base::names(base::.GlobalEnv),                   ...future.globalenv.names))            else NULL, started = ...future.startTime, version = "1.8")    }, condition = base::local({        c <- base::c        inherits <- base::inherits        invokeRestart <- base::invokeRestart        length <- base::length        list <- base::list        seq.int <- base::seq.int        signalCondition <- base::signalCondition        sys.calls <- base::sys.calls        `[[` <- base::`[[`        `+` <- base::`+`        `<<-` <- base::`<<-`        sysCalls <- function(calls = sys.calls(), from = 1L) {            calls[seq.int(from = from + 12L, to = length(calls) -                 3L)]        }        function(cond) {            is_error <- inherits(cond, "error")            ignore <- !is_error && !is.null(NULL) && inherits(cond,                 NULL)            if (is_error) {                sessionInformation <- function() {                  list(r = base::R.Version(), locale = base::Sys.getlocale(),                     rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(),                     search = base::search(), system = base::Sys.info())                }                ...future.conditions[[length(...future.conditions) +                   1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame),                   cond$call), session = sessionInformation(),                   timestamp = base::Sys.time(), signaled = 0L)                signalCondition(cond)            }            else if (!ignore && TRUE && inherits(cond, c("condition",             "immediateCondition"))) {                signal <- TRUE && inherits(cond, "immediateCondition")                ...future.conditions[[length(...future.conditions) +                   1L]] <<- list(condition = cond, signaled = base::as.integer(signal))                if (TRUE && !signal) {                  muffleCondition <- function (cond, pattern = "^muffle")                   {                    inherits <- base::inherits                    invokeRestart <- base::invokeRestart                    is.null <- base::is.null                    muffled <- FALSE                    if (inherits(cond, "message")) {                      muffled <- grepl(pattern, "muffleMessage")                      if (muffled)                         invokeRestart("muffleMessage")                    }                    else if (inherits(cond, "warning")) {                      muffled <- grepl(pattern, "muffleWarning")                      if (muffled)                         invokeRestart("muffleWarning")                    }                    else if (inherits(cond, "condition")) {                      if (!is.null(pattern)) {                        computeRestarts <- base::computeRestarts                        grepl <- base::grepl                        restarts <- computeRestarts(cond)                        for (restart in restarts) {                          name <- restart$name                          if (is.null(name))                             next                          if (!grepl(pattern, name))                             next                          invokeRestart(restart)                          muffled <- TRUE                          break                        }                      }                    }                    invisible(muffled)                  }                  muffleCondition(cond, pattern = "^muffle")                }            }            else {                if (TRUE) {                  muffleCondition <- function (cond, pattern = "^muffle")                   {                    inherits <- base::inherits                    invokeRestart <- base::invokeRestart                    is.null <- base::is.null                    muffled <- FALSE                    if (inherits(cond, "message")) {                      muffled <- grepl(pattern, "muffleMessage")                      if (muffled)                         invokeRestart("muffleMessage")                    }                    else if (inherits(cond, "warning")) {                      muffled <- grepl(pattern, "muffleWarning")                      if (muffled)                         invokeRestart("muffleWarning")                    }                    else if (inherits(cond, "condition")) {                      if (!is.null(pattern)) {                        computeRestarts <- base::computeRestarts                        grepl <- base::grepl                        restarts <- computeRestarts(cond)                        for (restart in restarts) {                          name <- restart$name                          if (is.null(name))                             next                          if (!grepl(pattern, name))                             next                          invokeRestart(restart)                          muffled <- TRUE                          break                        }                      }                    }                    invisible(muffled)                  }                  muffleCondition(cond, pattern = "^muffle")                }            }        }    }))}, error = function(ex) {    base::structure(base::list(value = NULL, visible = NULL,         conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed,             ...future.rng), started = ...future.startTime, finished = Sys.time(),         session_uuid = NA_character_, version = "1.8"), class = "FutureResult")}, finally = {    if (!identical(...future.workdir, getwd()))         setwd(...future.workdir)    {        if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) {            ...future.oldOptions$nwarnings <- NULL        }        base::options(...future.oldOptions)        if (.Platform$OS.type == "windows") {            old_names <- names(...future.oldEnvVars)            envs <- base::Sys.getenv()            names <- names(envs)            common <- intersect(names, old_names)            added <- setdiff(names, old_names)            removed <- setdiff(old_names, names)            changed <- common[...future.oldEnvVars[common] !=                 envs[common]]            NAMES <- toupper(changed)            args <- list()            for (kk in seq_along(NAMES)) {                name <- changed[[kk]]                NAME <- NAMES[[kk]]                if (name != NAME && is.element(NAME, old_names))                   next                args[[name]] <- ...future.oldEnvVars[[name]]            }            NAMES <- toupper(added)            for (kk in seq_along(NAMES)) {                name <- added[[kk]]                NAME <- NAMES[[kk]]                if (name != NAME && is.element(NAME, old_names))                   next                args[[name]] <- ""            }            NAMES <- toupper(removed)            for (kk in seq_along(NAMES)) {                name <- removed[[kk]]                NAME <- NAMES[[kk]]                if (name != NAME && is.element(NAME, old_names))                   next                args[[name]] <- ...future.oldEnvVars[[name]]            }            if (length(args) > 0)                 base::do.call(base::Sys.setenv, args = args)            args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL        }        else {            base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars))        }        {            if (base::length(...future.futureOptionsAdded) >                 0L) {                opts <- base::vector("list", length = base::length(...future.futureOptionsAdded))                base::names(opts) <- ...future.futureOptionsAdded                base::options(opts)            }            {                {                  base::assign(".Random.seed", c(10407L, -659147177L,                   990812963L, -1566057626L, -122261215L, 892845270L,                   279018281L), envir = base::globalenv(), inherits = FALSE)                  NULL                }                options(future.plan = NULL)                if (is.na(NA_character_))                   Sys.unsetenv("R_FUTURE_PLAN")                else Sys.setenv(R_FUTURE_PLAN = NA_character_)                future::plan(list(function (..., envir = parent.frame())                 {                  future <- SequentialFuture(..., envir = envir)                  if (!future$lazy)                     future <- run(future)                  invisible(future)                }), .cleanup = FALSE, .init = FALSE)            }        }    }})
28: eval(expr, envir = envir, enclos = baseenv())
29: eval(expr, envir = envir, enclos = baseenv())
30: run.UniprocessFuture(future)
31: run(future)
32: run.Future(future)
33: run(future)
34: future(expr, substitute = FALSE, envir = future.envir, stdout = future.stdout,     conditions = future.conditions, globals = globals_ii, packages = packages_ii,     seed = future.seed, label = labels[ii])
35: future_xapply(FUN = FUN, nX = nX, chunk_args = X, args = list(...),     get_chunk = `chunkWith[[`, expr = expr, envir = envir, future.envir = future.envir,     future.globals = future.globals, future.packages = future.packages,     future.scheduling = future.scheduling, future.chunk.size = future.chunk.size,     future.stdout = future.stdout, future.conditions = future.conditions,     future.seed = future.seed, future.label = future.label, fcn_name = fcn_name,     args_name = args_name, debug = debug)
36: future.apply::future_lapply(1:single_simulation$iters, FUN = function(j) {    failed_attempts <- 0    complete <- 0    while (complete < 1 & failed_attempts < 0.1 * single_simulation$iters) {        r <- tryCatch({            run_iteration(single_simulation)        }, error = function(e) {            e        })        if (!"error" %in% class(r)) {            complete <- complete + 1        }        else {            if (failed_attempts == 0.1 * single_simulation$iters) {                stop(paste("attempted 10 percent of total iterations in single thread;",                   "something is not right, here's the most recent error:",                   r))            }            failed_attempts <- failed_attempts + 1        }    }    if (is.data.frame(r)) {        r$iter <- j    }    else {        stopifnot(is.list(r))        if (!all(sapply(r, is.data.frame))) {            print(r$message)            stop(paste0("Error in simulate.sim_config. Results are not data.frames. Error: \n",                 r$message))        }        r <- lapply(r, function(x) {            x$iter <- j        })    }    return(r)}, future.seed = use_seed, ...)
37: dispatch_simulations(sim_config, use_future = T, seed = 9782,     verbose = 2, future.globals = c("cluster_adjust_se"), future.packages = c("MASS",         "dplyr", "optic"))
38: eval(expr, envir, enclos)
39: eval(expr, envir, enclos)
40: eval_with_user_handlers(expr, envir, enclos, user_handlers)
41: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers))
42: withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)
43: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler))
44: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)))
45: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,     debug = debug, last = i == length(out), use_try = stop_on_error !=         2L, keep_warning = keep_warning, keep_message = keep_message,     log_echo = log_echo, log_warning = log_warning, output_handler = output_handler,     include_timing = include_timing)
46: evaluate::evaluate(...)
47: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options))
48: in_dir(input_dir(), expr)
49: in_input_dir(evaluate(code, envir = env, new_device = FALSE,     keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options)))
50: eng_r(options)
51: block_exec(params)
52: call_block(x)
53: process_group.block(group)
54: process_group(group)
55: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0") &&         !xfun::check_old_package("learnr", "0.11.3")) rlang::entrace(e))
56: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0") &&         !xfun::check_old_package("learnr", "0.11.3")) rlang::entrace(e)),     error = function(e) {        setwd(wd)        write_utf8(res, output %n% stdout())        message("\nQuitting from lines ", paste(current_lines(i),             collapse = "-"), if (labels[i] != "")             sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile")))    })
57: process_file(text, output)
58: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
59: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),     output_dir = getwd(), ...)
60: vweave_rmarkdown(...)
61: engine$weave(file, quiet = quiet, encoding = enc)
62: doTryCatch(return(expr), name, parentenv, handler)
63: tryCatchOne(expr, names, parentenv, handlers[[1L]])
64: tryCatchList(expr, classes, parentenv, handlers)
65: tryCatch({    engine$weave(file, quiet = quiet, encoding = enc)    setwd(startdir)    output <- find_vignette_product(name, by = "weave", engine = engine)    if (!have.makefile && vignette_is_tex(output)) {        texi2pdf(file = output, clean = FALSE, quiet = quiet)        output <- find_vignette_product(name, by = "texi2pdf",             engine = engine)    }    outputs <- c(outputs, output)}, error = function(e) {    thisOK <<- FALSE    fails <<- c(fails, file)    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",         file, conditionMessage(e)))})
66: tools::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/optic.Rcheck/vign_test/optic",     skip = TRUE, ser_elibs = "/tmp/Rtmp5aKxzN/file1b1d8f6602e2a8.rds")
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault