CRAN Package Check Results for Package logitr

Last updated on 2025-11-26 17:49:57 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.3 5.24 149.51 154.75 OK
r-devel-linux-x86_64-debian-gcc 1.1.3 3.65 113.23 116.88 OK
r-devel-linux-x86_64-fedora-clang 1.1.3 34.00 206.07 240.07 OK
r-devel-linux-x86_64-fedora-gcc 1.1.3 11.00 243.49 254.49 OK
r-devel-windows-x86_64 1.1.2 11.00 207.00 218.00 OK
r-patched-linux-x86_64 1.1.3 5.75 143.54 149.29 OK
r-release-linux-x86_64 1.1.3 4.88 142.48 147.36 OK
r-release-macos-arm64 1.1.3 1.00 45.00 46.00 ERROR
r-release-macos-x86_64 1.1.3 5.00 178.00 183.00 OK
r-release-windows-x86_64 1.1.2 9.00 208.00 217.00 OK
r-oldrel-macos-arm64 1.1.3 1.00 51.00 52.00 OK
r-oldrel-macos-x86_64 1.1.3 7.00 202.00 209.00 OK
r-oldrel-windows-x86_64 1.1.3 11.00 258.00 269.00 OK

Check Details

Version: 1.1.3
Check: examples
Result: ERROR Running examples in ‘logitr-Ex.R’ failed The error most likely occurred in: > ### Name: logitr > ### Title: The main function for estimating logit models > ### Aliases: logitr > ### Keywords: logit logitr mixed mnl mxl willingness-to-pay wtp > > ### ** Examples > > # For more detailed examples, visit > # https://jhelvy.github.io/logitr/articles/ > > library(logitr) > > # Estimate a MNL model in the Preference space > mnl_pref <- logitr( + data = yogurt, + outcome = "choice", + obsID = "obsID", + pars = c("price", "feat", "brand") + ) Running model... Done! > > # Estimate a MNL model in the WTP space, using a 5-run multistart > mnl_wtp <- logitr( + data = yogurt, + outcome = "choice", + obsID = "obsID", + pars = c("feat", "brand"), + scalePar = "price", + numMultiStarts = 5 + ) Running multistart... Random starting point iterations: 5 Number of cores: 15 *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) .Internal(printDeferredWarnings()) *** caught segfault *** address 0x110, cause 'invalid permissions' 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: *** caught segfault *** *** caught segfault *** address 0x110, cause 'invalid permissions' address 0x110, cause 'invalid permissions' classes)) tryInvokeRestart("muffleWarning"))doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) Traceback: model$iterations <- result$iterations model$status <- result$status 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) model$message <- result$message}, error = function(e) { }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: }) eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) dcall <- deparse(call, nlines = 1L) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 8: system.time({ w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { model <- mi$model}) if (w > LONG) result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) if (!is.null(result)) { .Internal(printDeferredWarnings()) } model$fail <- FALSE 8: system.time({ model <- mi$model invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$coefficients <- result$solution16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message17: model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations }}) FUN(X[[i]], ...) model$status <- result$status 9: model$message <- result$message18: lapply(seq_len(cores), inner.do) FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: }}) 9: FUN(X[[i]], ...)19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e)22: if (!is.null(call)) {withCallingHandlers(expr, message = function(c) if (inherits(c, 13: tryCatchList(expr, classes, parentenv, handlers) 14: if (identical(call[[1L]], quote(doTryCatch))) tryCatch(expr, error = function(e) { call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") classes)) tryInvokeRestart("muffleMessage")) 23: prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")suppressMessages(suppressWarnings(parallel::mclapply(miList, if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) .Internal(seterrmessage(msg[1L])) 25: if (!silent && isTRUE(getOption("show.error.messages"))) { if (w > LONG) cat(msg, file = outFile)logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", prefix <- paste0(prefix, "\n ") .Internal(printDeferredWarnings()) "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... } invisible(structure(msg, class = "try-error", condition = e))}) } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: "brand"), scalePar = "price", numMultiStarts = 5)logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... An irrecoverable exception occurred. R is aborting now ... Error in names(x) <- value : 'names' attribute [3] must be the same length as the vector [0] Calls: logitr -> getMultistartSummary -> colnames<- Execution halted Flavor: r-release-macos-arm64

Version: 1.1.3
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: --- re-building ‘basic_usage.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: *** caught segfault *** address 0x110, cause 'invalid permissions' knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) *** caught segfault *** address 0x110, cause 'invalid permissions' 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: *** caught segfault *** address 0x110, cause 'invalid permissions' FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { rlang::entrace(e) } } }), function(loc) { setwd(wd) }) if (!is.null(result)) { model$fail <- FALSE write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: 50: tryCatchList(expr, classes, parentenv, handlers) *** caught segfault *** address 0x110, cause 'invalid permissions' 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) {process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 53: vweave_rmarkdown(...) 54: type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")engine$weave(file, quiet = quiet, encoding = enc) 55: .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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)}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: }withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir)}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: 27: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") *** caught segfault *** address 0x110, cause 'invalid permissions' }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) *** caught segfault *** address 0x110, cause 'invalid permissions' 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) {doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {system.time({ if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) parallel::mclapply(miList, runModel, mc.cores = numCores) 4: 20: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir))}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { 29: withCallingHandlers(code, message = function (cnd) model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) {12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: 33: doWithOneRestart(return(expr), restart) 34: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) TRUE42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 43: pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output)49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206873a6b9.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from basic_usage.Rmd:82-91 [unnamed-chunk-7] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'basic_usage.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘basic_usage.Rmd’ --- re-building ‘benchmark.Rmd’ using rmarkdown --- finished re-building ‘benchmark.Rmd’ --- re-building ‘convergence.Rmd’ using rmarkdown --- finished re-building ‘convergence.Rmd’ --- re-building ‘data_formatting.Rmd’ using rmarkdown --- finished re-building ‘data_formatting.Rmd’ --- re-building ‘interactions.Rmd’ using rmarkdown --- finished re-building ‘interactions.Rmd’ --- re-building ‘mnl_models.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) }21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output()22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir)}) 30: eval(call) 31: eval(call) 32: 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage")doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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 { }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ *** caught segfault *** address 0x110, cause 'invalid permissions' for (expr in tle$exprs) { if (options$error && options$include) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) *** caught segfault *** address 0x110, cause 'invalid permissions' 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: *** caught segfault *** address 0x110, cause 'invalid permissions' withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 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, 41: 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)) 42: 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))) 44: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: eng_r(options)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) *** caught segfault *** error <<- format(cnd)address 0x110, cause 'invalid permissions' } } else { rlang::entrace(e) } } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) rlang::entrace(e) } } }), function(loc) { setwd(wd)54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) Traceback: 56: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) tryCatchOne(expr, names, parentenv, handlers[[1L]]) *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 2: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) eval_f(x0, ...)57: tryCatchList(expr, classes, parentenv, handlers)59: 3: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") Traceback: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 58: mi = mi, opts = mi$options) 4: An irrecoverable exception occurred. R is aborting now ... 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) 1: output <- find_vignette_product(name, by = "weave", engine = engine)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) if (!have.makefile && vignette_is_tex(output)) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) doTryCatch(return(expr), name, parentenv, handler) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) texi2pdf(file = output, clean = FALSE, quiet = quiet) 5: *** caught segfault *** tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4: output <- find_vignette_product(name, by = "texi2pdf", 6: address 0x110, cause 'invalid permissions' 6: engine = engine)tryCatchList(expr, classes, parentenv, handlers) } }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) doTryCatch(return(expr), name, parentenv, handler)59: 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: Traceback: 5: 1: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", tryCatchList(expr, classes, parentenv, handlers)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)system.time({tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds")tryCatch({ model <- mi$modelAn irrecoverable exception occurred. R is aborting now ... result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { mi = mi, opts = mi$options) call <- conditionCall(e) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: if (!is.null(call)) {}, error = function(e) { 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model}) result <- NULL tryCatch({eval_f(x0, ...) if (identical(call[[1L]], quote(doTryCatch))) 8: call <- sys.call(-4L) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, dcall <- deparse(call, nlines = 1L) mi = mi, opts = mi$options) 2: prefix <- paste("Error in", dcall, ": ")eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: system.time({ 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, LONG <- 75L }, error = function(e) { mi = mi, opts = mi$options)doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") model <- mi$model if (is.na(w)) }) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { 6: 4: cat(msg, file = outFile) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) result <- NULL .Internal(printDeferredWarnings()) Traceback: 1: doTryCatch(return(expr), name, parentenv, handler) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) tryCatch({mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)tryCatchList(expr, classes, parentenv, handlers) } invisible(structure(msg, class = "try-error", condition = e))}) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) 7: tryCatch({ model$iterations <- result$iterations model$status <- result$status model$message <- result$message } result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, *** caught segfault *** 15: 6: address 0x110, cause 'invalid permissions' 2: eval_f(x0, ...)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 20: }) tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 9: FUN(X[[i]], ...) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 10: 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: }, error = function(e) {})tryCatchList(expr, classes, parentenv, handlers)22: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])withCallingHandlers(expr, message = function(c) if (inherits(c, mi = mi, opts = mi$options) 13: }, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({tryCatchList(expr, classes, parentenv, handlers) classes)) tryInvokeRestart("muffleMessage")) 7: tryCatch({ 14: tryCatch(expr, error = function(e) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { 9: call <- conditionCall(e)23: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 8: suppressMessages(suppressWarnings(parallel::mclapply(miList, if (!is.null(call)) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (identical(call[[1L]], quote(doTryCatch))) runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) system.time({ call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective)11: mi = mi, opts = mi$options) model$iterations <- result$iterations model$status <- result$status model$message <- result$message LONG <- 75L model <- mi$model }}, error = function(e) {}) 8: system.time({ model <- mi$model26: result <- NULL}) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { Traceback: }) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], result <- NULL 9: FUN(X[[i]], ...) tryCatch({doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: type = "b")tryCatchList(expr, classes, parentenv, handlers) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)10: if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations eval(expr, envir) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options) model$status <- result$status if (w > LONG) 7: 27: }, error = function(e) { model$message <- result$message lapply(X = S, FUN = FUN, ...) }eval(expr, envir)tryCatch({ }) prefix <- paste0(prefix, "\n ")11: 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) } else prefix <- "Error : " })doTryCatch(return(expr), name, parentenv, handler)14: 12: 28: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchOne(expr, names, parentenv, handlers[[1L]])withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { mi = mi, opts = mi$options) if (!is.null(result)) {tryCatch(expr, error = function(e) { msg <- paste0(prefix, conditionMessage(e), "\n") }, error = function(e) { model$fail <- FALSE watcher$push(cnd)11: model$coefficients <- result$solution .Internal(seterrmessage(msg[1L])) call <- conditionCall(e)doTryCatch(return(expr), name, parentenv, handler) model$logLik <- as.numeric(-1 * result$objective) if (!silent && isTRUE(getOption("show.error.messages"))) { if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) } model$iterations <- result$iterations model$status <- result$status model$message <- result$message }12: 13: if (on_message$silence) {}) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) cat(msg, file = outFile) .Internal(printDeferredWarnings())tryCatchOne(expr, names, parentenv, handlers[[1L]])}) tryCatchList(expr, classes, parentenv, handlers) } invokeRestart("muffleMessage") invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: .Internal(printDeferredWarnings()) 9: 8: FUN(X[[i]], ...)13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())FUN(X[[i]], ...) }system.time({ }}, warning = function (cnd) invisible(structure(msg, class = "try-error", condition = e)) 14: } model <- mi$model{ result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { if (getOption("warn") >= 2 || getOption("warn") < 0) {}) invisible(structure(msg, class = "try-error", condition = e)) call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: return()18: tryCatch(expr, error = function(e) { 10: withCallingHandlers(code, message = function (cnd) }lapply(seq_len(cores), inner.do) call <- conditionCall(e) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]})15: lapply(X = S, FUN = FUN, ...){ watcher$capture_plot_and_output() w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 20: 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) watcher$capture_plot_and_output()withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: if (is.na(w)) try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (on_warning$capture) {eval(call)withVisible(eval(expr, envir))11: 22: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], doTryCatch(return(expr), name, parentenv, handler) cnd <- sanitize_call(cnd) withCallingHandlers(expr, message = function(c) if (inherits(c, 29: type = "b")12: 32: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) withCallingHandlers(code, message = function (cnd) with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } watcher$push(cnd) TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: 16: {withRestartList(expr, restarts[-nr]) } if (on_warning$silence) { if (w > LONG) watcher$capture_plot_and_output() classes)) tryInvokeRestart("muffleMessage")) prefix <- paste0(prefix, "\n ") sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) call <- sys.call(-4L) invokeRestart("muffleWarning")36: 23: doWithOneRestart(return(expr), restart)suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) if (on_message$capture) { } }}, error = function (cnd) 37: dcall <- deparse(call, nlines = 1L)withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ else prefix <- "Error : " watcher$push(cnd){ } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() for (expr in tle$exprs) {17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) watcher$capture_plot_and_output()24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } prefix <- paste("Error in", dcall, ": ") ev <- withVisible(eval(expr, envir)) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (on_message$silence) {24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { cnd <- sanitize_call(cnd) invisible(structure(msg, class = "try-error", condition = e)) keep_message = if (is.numeric(options$message)) TRUE else options$message, msg <- paste0(prefix, conditionMessage(e), "\n") invokeRestart("muffleMessage") if (on_warning$capture) { watcher$push(cnd)}) if (getOption("warn") >= 2 || getOption("warn") < 0) { .Internal(seterrmessage(msg[1L])) cnd <- sanitize_call(cnd) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: switch(on_error, continue = invokeRestart("eval_continue"), return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd)parallel::mclapply(miList, runModel, mc.cores = numCores) } } }, warning = function (cnd) stop = invokeRestart("eval_stop"), error = NULL){ stop_on_error = if (is.numeric(options$error)) options$error else { if (getOption("warn") >= 2 || getOption("warn") < 0) {15: watcher$push(cnd)}) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() if (on_warning$silence) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) cnd <- sanitize_call(cnd) if (options$error && options$include) invokeRestart("muffleWarning") 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL) }try(lapply(X = S, FUN = FUN, ...), silent = TRUE)20: 43: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) watcher$push(cnd)30: switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: 47: 16: eval(call) if (on_warning$silence) {eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { }) process_group(group) invokeRestart("muffleWarning")suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))30: 31: } ev <- withVisible(eval(expr, envir))eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))}, error = function (cnd) 48: watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) watcher$capture_plot_and_output(){ watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL) watcher$print_value(ev$value, ev$visible, envir)22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))eval(call) } TRUE}) withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), }17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) }, handlers) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 27: error = function(e) {30: eval(call) 31: eval(call) 32: runModel, mc.cores = numCores)))32: eval(expr, envir) 39: with_handlers({28: if (progress && is.function(pb$interrupt)) withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) for (expr in tle$exprs) { pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { watcher$capture_plot_and_output() ev <- withVisible(eval(expr, envir))24: with_handlers({withVisible(eval(expr, envir)) 29: for (expr in tle$exprs) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } ev <- withVisible(eval(expr, envir))runMultistart(modelInputs)withCallingHandlers(code, message = function (cnd) 33: watcher$capture_plot_and_output()doWithOneRestart(return(expr), restart) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) watcher$print_value(ev$value, ev$visible, envir) watcher$capture_plot_and_output() }) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) {{ 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) }34: watcher$print_value(ev$value, ev$visible, envir)40: evaluate::evaluate(...) 41: } TRUE watcher$push(cnd)}, handlers)withOneRestart(expr, restarts[[1L]]) 35: else { } TRUE}, handlers)evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }withRestartList(expr, restarts[-nr]) if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) watcher$capture_plot_and_output() keep_message = if (is.numeric(options$message)) TRUE else options$message, if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) stop_on_error = if (is.numeric(options$error)) options$error else { 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) rlang::entrace(e) if (options$error && options$include) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 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))) watcher$capture_plot_and_output() watcher$capture_plot_and_output()42: if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: watcher$push(cnd)vweave_rmarkdown(...) watcher$print_value(ev$value, ev$visible, envir) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) {block_exec(params) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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 } 46: switch(on_error, continue = invokeRestart("eval_continue"), call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { TRUE }, output_handler = knit_handlers(options$render, options))}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: OK <<- FALSE44: rlang::entrace(e) stop = invokeRestart("eval_stop"), error = NULL)eng_r(options) 45: block_exec(params) 46: call_block(x) 47: }) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }doWithOneRestart(return(expr), restart) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)33: process_group(group)doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } file, conditionMessage(e))) TRUE }, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 40: evaluate::evaluate(...) } 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 40: }) } eng_r(options) error = function(e) {evaluate::evaluate(...)37: if (progress && is.function(pb$interrupt)) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output)41: 59: 42: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: error = function(e) { })evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) }withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) vweave_rmarkdown(...)51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) keep_message = if (is.numeric(options$message)) TRUE else options$message, else {38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() stop_on_error = if (is.numeric(options$error)) options$error else { watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)49: 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) rlang::entrace(e)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) output <- find_vignette_product(name, by = "weave", engine = engine) } }58: }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler)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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... if (options$error && options$include) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... } 0L 56: } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { else 2L }, output_handler = knit_handlers(options$render, options))55: doTryCatch(return(expr), name, parentenv, handler) tryCatchOne(expr, names, parentenv, handlers[[1L]])42: setwd(wd) in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), write_utf8(res, output %n% stdout())56: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...)doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28202fe352ff.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from mnl_models.Rmd:85-98 [unnamed-chunk-9] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'mnl_models.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘mnl_models.Rmd’ --- re-building ‘mnl_models_weighted.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) *** caught segfault *** address 0x110, cause 'invalid permissions' watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) *** caught segfault *** address 0x110, cause 'invalid permissions' { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) *** caught segfault *** model$iterations <- result$iterationsaddress 0x110, cause 'invalid permissions' model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], mi = mi, opts = mi$options) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 4: 5: type = "b")tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) doTryCatch(return(expr), name, parentenv, handler) 5: mi = mi, opts = mi$options)17: FUN(X[[i]], ...)}, error = function(e) {}) 18: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)lapply(seq_len(cores), inner.do) system.time({ }, error = function(e) {19: }) model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, 10: lapply(X = S, FUN = FUN, ...) 11: runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) {doTryCatch(return(expr), name, parentenv, handler) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " 14: tryCatch(expr, error = function(e) { Traceback: 25: call <- conditionCall(e)logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())27: eval(expr, envir) 28: withVisible(eval(expr, envir)) }29: 1: withCallingHandlers(code, message = function (cnd) { invisible(structure(msg, class = "try-error", condition = e))}) 15: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!is.null(call)) { mi = mi, opts = mi$options) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") watcher$capture_plot_and_output()16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: if (on_message$capture) { LONG <- 75LFUN(X[[i]], ...) watcher$push(cnd) sm <- strsplit(conditionMessage(e), "\n")[[1L]]18: 4: doTryCatch(return(expr), name, parentenv, handler) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, } if (on_message$silence) { invokeRestart("muffleMessage") } 5: }, warning = function (cnd) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (w > LONG) prefix <- paste0(prefix, "\n ") {23: } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)suppressMessages(suppressWarnings(parallel::mclapply(miList, 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ if (getOption("warn") >= 2 || getOption("warn") < 0) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, return() runModel, mc.cores = numCores))) mi = mi, opts = mi$options) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) } }, error = function(e) {16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) watcher$capture_plot_and_output()19: })parallel::mclapply(miList, runModel, mc.cores = numCores) 8: if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) {24: system.time({runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: 20: ev <- withVisible(eval(expr, envir)) model <- mi$model result <- NULLwithVisible(eval(expr, envir)) tryCatch({ 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$print_value(ev$value, ev$visible, envir) }withCallingHandlers(expr, warning = function(w) if (inherits(w, mi = mi, opts = mi$options) }, error = function(e) { TRUE }) classes)) tryInvokeRestart("muffleWarning")) if (!is.null(result)) { model$fail <- FALSE watcher$capture_plot_and_output() model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status}, handlers) if (on_warning$capture) { model$message <- result$message 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }36: 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))40: 24: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()evaluate::evaluate(...)runMultistart(modelInputs) } }) 25: 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler)logitr(data = cars_us, outcome = "choice", obsID = "obsnum", 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 41: watcher$print_value(ev$value, ev$visible, envir)tryCatch(expr, error = function(e) {evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, } call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L TRUE sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", if (is.na(w)) 36: "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")doWithOneRestart(return(expr), restart) 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) if (w > LONG) 37: prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])27: 0L *** caught segfault *** address 0x110, cause 'invalid permissions' else 2L }, output_handler = knit_handlers(options$render, options)) }42: in_dir(input_dir(), expr) 43: eval(expr, envir)in_input_dir(evaluate(code, envir = env, new_device = FALSE, 38: withRestartList(expr, restarts) invisible(structure(msg, class = "try-error", condition = e)) 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) 0L28: withVisible(eval(expr, envir))}) 29: withCallingHandlers(code, message = function (cnd) {39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options)15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) watcher$capture_plot_and_output() watcher$capture_plot_and_output()16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) watcher$print_value(ev$value, ev$visible, envir) 19: if (on_message$capture) { } watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output()parallel::mclapply(miList, runModel, mc.cores = numCores) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 45: 30: eval(call) 31: eval(call) 20: block_exec(params) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)withCallingHandlers(expr, warning = function(w) if (inherits(w, 46: classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, 40: evaluate::evaluate(...)32: classes)) tryInvokeRestart("muffleMessage"))call_block(x) 41: 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)) 42: in_dir(input_dir(), expr) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, *** caught segfault *** 43: 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, with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) runModel, mc.cores = numCores))) watcher$capture_plot_and_output() 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))) watcher$print_value(ev$value, ev$visible, envir)47: 24: runMultistart(modelInputs) 25: address 0x110, cause 'invalid permissions' }logitr(data = cars_us, outcome = "choice", obsID = "obsnum", 44: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), Traceback: error = function(e) {eng_r(options) if (progress && is.function(pb$interrupt)) 1: pb$interrupt() pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) if (xfun::pkg_available("rlang", "1.0.0")) { "bev150", "american", "japanese", "chinese", "skorean", 45: block_exec(params) 46: call_block(x) 2: 47: process_group(group) eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 48: "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), if (is_R_CMD_build() || is_R_CMD_check()) { mi = mi, opts = mi$options) TRUE}, handlers) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) cnd = tryCatch(rlang::entrace(e), error = identity)33: scalePar = "price", robust = TRUE, numMultiStarts = 10)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error <<- format(cnd)doWithOneRestart(return(expr), restart) error = function(e) { } 26: else { if (progress && is.function(pb$interrupt)) 34: withOneRestart(expr, restarts[[1L]]) eval(expr, envir) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) rlang::entrace(e)27: } pb$interrupt()eval(expr, envir)35: 6: if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())) rlang::entrace(e)withRestartList(expr, restarts[-nr])tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model } result <- NULL 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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 (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) } }), function(loc) { if (options$error && options$include) 0L setwd(wd) tryCatch({ else 2L }, output_handler = knit_handlers(options$render, options)) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution50: model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message } write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 42: Traceback: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: })51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...)28: 1: in_dir(input_dir(), expr)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)doTryCatch(return(expr), name, parentenv, handler) 9: withVisible(eval(expr, envir)) 2: FUN(X[[i]], ...) eval_f(x0, ...)56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { 29: withCallingHandlers(code, message = function (cnd) { OK <<- FALSE 3: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) watcher$capture_plot_and_output() 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { mi = mi, opts = mi$options)54: engine$weave(file, quiet = quiet, encoding = enc) 55: invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() 4: 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) }doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) if (on_warning$silence) { 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 7: 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) {10: if (is_R_CMD_build() || is_R_CMD_check()) {An irrecoverable exception occurred. R is aborting now ... invokeRestart("muffleWarning")tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) mi = mi, opts = mi$options)}, error = function(e) {}) if (!have.makefile && vignette_is_tex(output)) {lapply(X = S, FUN = FUN, ...) }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) texi2pdf(file = output, clean = FALSE, quiet = quiet) 8: system.time({ model <- mi$model result <- NULL cnd = tryCatch(rlang::entrace(e), error = identity) output <- find_vignette_product(name, by = "texi2pdf", tryCatch({11: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, watcher$push(cnd) engine = engine)doTryCatch(return(expr), name, parentenv, handler) error <<- format(cnd) switch(on_error, continue = invokeRestart("eval_continue"), }12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], stop = invokeRestart("eval_stop"), error = NULL) } else { mi = mi, opts = mi$options) }, error = function(e) {})}, error = function(e) { rlang::entrace(e) OK <<- FALSE } }) type = "b") if (w > LONG) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", prefix <- paste0(prefix, "\n ") if (!is.null(result)) { } file, conditionMessage(e))) }) }}) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") 49: .Internal(seterrmessage(msg[1L]))xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } model$fail <- FALSE30: if (!silent && isTRUE(getOption("show.error.messages"))) { else {eval(call) model$coefficients <- result$solution59: cat(msg, file = outFile) rlang::entrace(e) model$logLik <- as.numeric(-1 * result$objective)31: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout())eval(call) model$iterations <- result$iterations paste0("\nQuitting from ", loc, if (!is.null(error)) model$status <- result$status paste0("\n", rule(), error, "\n", rule())) TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") .Internal(printDeferredWarnings()) model$message <- result$message } invisible(structure(msg, class = "try-error", condition = e))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }}) } An irrecoverable exception occurred. R is aborting now ... 50: process_file(text, output) 51: TRUE}, handlers) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...)33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)withRestartList(expr, restarts[-nr]) }) 52: 11: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 15: 36: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart) output_dir = getwd(), ...)12: 16: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 53: 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])vweave_rmarkdown(...) 17: 38: 54: FUN(X[[i]], ...)engine$weave(file, quiet = quiet, encoding = enc)withRestartList(expr, restarts) .Internal(seterrmessage(msg[1L])) 39: withRestarts(with_handlers({ 55: if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())doTryCatch(return(expr), name, parentenv, handler) }18: for (expr in tle$exprs) { lapply(seq_len(cores), inner.do)56: 19: parallel::mclapply(miList, runModel, mc.cores = numCores) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... runMultistart(modelInputs)FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) }, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: 24: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUErunMultistart(modelInputs) }, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 25: 35: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) {withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) {37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) invokeRestart("muffleMessage") }}, warning = function (cnd) { } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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 if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 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) }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) }39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 41: 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))57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) } 42: in_dir(input_dir(), expr) 43: }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})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, 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file28206bece411.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from mnl_models_weighted.Rmd:64-80 [unnamed-chunk-3] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'mnl_models_weighted.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘mnl_models_weighted.Rmd’ --- re-building ‘mxl_models.Rmd’ using rmarkdown --- finished re-building ‘mxl_models.Rmd’ --- re-building ‘predict.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: tryCatch({ Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) engine$weave(file, quiet = quiet, encoding = enc) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: Traceback: system.time({ 1: setwd(startdir) model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 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) }mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 9: }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)}) 8: system.time({ .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 10: lapply(X = S, FUN = FUN, ...) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir)11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() cat(msg, file = outFile) .Internal(printDeferredWarnings()) *** caught segfault *** address 0x110, cause 'invalid permissions' } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: }, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr])doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 36: doWithOneRestart(return(expr), restart) 37: 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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 { 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x)42: in_dir(input_dir(), expr) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) {43: 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 (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 45: block_exec(params) 46: 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) {doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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", cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: engine = engine)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) Traceback: 1: *** caught segfault *** 54: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: engine$weave(file, quiet = quiet, encoding = enc)59: eval_f(x0, ...)address 0x110, cause 'invalid permissions' 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution 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) }}, error = function(e) { OK <<- FALSE model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) }}) 9: FUN(X[[i]], ...)59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") *** caught segfault *** 10: *** caught segfault *** address 0x110, cause 'invalid permissions' An irrecoverable exception occurred. R is aborting now ... lapply(X = S, FUN = FUN, ...) address 0x110, cause 'invalid permissions' 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) *** caught segfault *** address 0x110, cause 'invalid permissions' 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) Traceback: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 8: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) system.time({ model <- mi$model result <- NULL tryCatch({ 2: 35: withRestartList(expr, restarts[-nr]) eval_f(x0, ...) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) {36: doWithOneRestart(return(expr), restart) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { mi = mi, opts = mi$options) model$status <- result$status *** caught segfault *** address 0x110, cause 'invalid permissions' ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE model$message <- result$message 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) }}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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, }) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model11: doTryCatch(return(expr), name, parentenv, handler) result <- NULL12: tryCatch({tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: 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))tryCatchList(expr, classes, parentenv, handlers) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { dcall <- deparse(call, nlines = 1L) if (options$error && options$include) prefix <- paste("Error in", dcall, ": ") }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message 0L Traceback: }}) else 2L LONG <- 75L }, output_handler = knit_handlers(options$render, options))) 1: 44: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 9: type = "b") 2: eng_r(options)eval_f(x0, ...) if (w > LONG) prefix <- paste0(prefix, "\n ") 3: FUN(X[[i]], ...) 10: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 45: }block_exec(params) 46: mi = mi, opts = mi$options) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") 4: lapply(X = S, FUN = FUN, ...) 11: call_block(x) 47: .Internal(seterrmessage(msg[1L]))doTryCatch(return(expr), name, parentenv, handler) 5: doTryCatch(return(expr), name, parentenv, handler)process_group(group)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 12: 6: if (!silent && isTRUE(getOption("show.error.messages"))) {48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) {13: tryCatchList(expr, classes, parentenv, handlers) cat(msg, file = outFile)tryCatchList(expr, classes, parentenv, handlers) cnd = tryCatch(rlang::entrace(e), error = identity)14: error <<- format(cnd) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) .Internal(printDeferredWarnings()) } Traceback: invisible(structure(msg, class = "try-error", condition = e)) }}, error = function(e) {}) else { rlang::entrace(e) } 1: }mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)tryCatch(expr, error = function(e) { call <- conditionCall(e)}) }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 2: 8: system.time({ model <- mi$model result <- NULL tryCatch({ error = function(e) {15: if (progress && is.function(pb$interrupt)) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, try(lapply(X = S, FUN = FUN, ...), silent = TRUE)eval_f(x0, ...) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { if (!is.null(call)) { mi = mi, opts = mi$options) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) cnd = tryCatch(rlang::entrace(e), error = identity) 3: error <<- format(cnd)16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: dcall <- deparse(call, nlines = 1L)FUN(X[[i]], ...)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, } }, error = function(e) { prefix <- paste("Error in", dcall, ": ") }) mi = mi, opts = mi$options) if (!is.null(result)) { else { 4: rlang::entrace(e)18: lapply(seq_len(cores), inner.do) LONG <- 75L model$fail <- FALSEdoTryCatch(return(expr), name, parentenv, handler) model$coefficients <- result$solution sm <- strsplit(conditionMessage(e), "\n")[[1L]] model$logLik <- as.numeric(-1 * result$objective)19: } } }), function(loc) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], parallel::mclapply(miList, runModel, mc.cores = numCores) type = "b") setwd(wd) write_utf8(res, output %n% stdout())20: 5: withCallingHandlers(expr, warning = function(w) if (inherits(w, model$iterations <- result$iterationstryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) paste0("\nQuitting from ", loc, if (!is.null(error)) model$status <- result$status 7: classes)) tryInvokeRestart("muffleWarning"))tryCatch({ if (w > LONG) paste0("\n", rule(), error, "\n", rule())) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 21: model$message <- result$message mi = mi, opts = mi$options)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) }, error = function(e) { prefix <- paste0(prefix, "\n ") }}) } else prefix <- "Error : "})}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 9: FUN(X[[i]], ...) msg <- paste0(prefix, conditionMessage(e), "\n")50: 8: 10: .Internal(seterrmessage(msg[1L]))22: system.time({process_file(text, output) lapply(X = S, FUN = FUN, ...)withCallingHandlers(expr, message = function(c) if (inherits(c, model <- mi$model classes)) tryInvokeRestart("muffleMessage")) result <- NULL if (!silent && isTRUE(getOption("show.error.messages"))) { 23: cat(msg, file = outFile) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, .Internal(printDeferredWarnings()) 51: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) }11: doTryCatch(return(expr), name, parentenv, handler) mi = mi, opts = mi$options)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE 26: invisible(structure(msg, class = "try-error", condition = e))52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), eval(expr, envir)12: }) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 27: 15: eval(expr, envir) model$coefficients <- result$solutiontry(lapply(X = S, FUN = FUN, ...), silent = TRUE) 13: tryCatchList(expr, classes, parentenv, handlers) model$logLik <- as.numeric(-1 * result$objective) output_dir = getwd(), ...)16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: model$iterations <- result$iterations model$status <- result$statusFUN(X[[i]], ...) model$message <- result$message }})18: 53: lapply(seq_len(cores), inner.do)28: 9: vweave_rmarkdown(...)FUN(X[[i]], ...) withVisible(eval(expr, envir))10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 19: 14: 54: tryCatch(expr, error = function(e) {engine$weave(file, quiet = quiet, encoding = enc) call <- conditionCall(e)14: if (!is.null(call)) {55: if (identical(call[[1L]], quote(doTryCatch))) parallel::mclapply(miList, runModel, mc.cores = numCores) doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 20: tryCatch(expr, error = function(e) {withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) call <- conditionCall(e)57: } if (!is.null(call)) { call <- sys.call(-4L) if (on_message$silence) { invokeRestart("muffleMessage") dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) }tryCatchList(expr, classes, parentenv, handlers) call <- sys.call(-4L)}, warning = function (cnd) 22: dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": "){ 58: if (getOption("warn") >= 2 || getOption("warn") < 0) { LONG <- 75LwithCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] sm <- strsplit(conditionMessage(e), "\n")[[1L]] return() } w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) 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) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) output <- find_vignette_product(name, by = "texi2pdf", w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 23: engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")suppressMessages(suppressWarnings(parallel::mclapply(miList, if (on_warning$silence) { if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } runModel, mc.cores = numCores))) invisible(structure(msg, class = "try-error", condition = e))59: invokeRestart("muffleWarning") type = "b")tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") if (w > LONG) }An irrecoverable exception occurred. R is aborting now ... }, error = function (cnd) 24: {runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", watcher$capture_plot_and_output()}) cnd <- sanitize_call(cnd) prefix <- paste0(prefix, "\n ")15: watcher$push(cnd) }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) "brand"), scalePar = "price", numMultiStarts = 10) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: 26: with_handlers({eval(expr, envir)16: 27: eval(expr, envir) else prefix <- "Error : "sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) for (expr in tle$exprs) { if (!silent && isTRUE(getOption("show.error.messages"))) { 28: withVisible(eval(expr, envir)) 29: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)withCallingHandlers(code, message = function (cnd) } TRUE cat(msg, file = outFile)17: FUN(X[[i]], ...) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)18: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) {23: }, handlers)lapply(seq_len(cores), inner.do) if (getOption("warn") >= 2 || getOption("warn") < 0) {suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 33: 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: withVisible(eval(expr, envir))doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) {suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) invokeRestart("muffleWarning")withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd)evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 25: }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) "brand"), scalePar = "price", numMultiStarts = 10) } keep_message = if (is.numeric(options$message)) TRUE else options$message, with_handlers({ TRUE26: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)eval(expr, envir) 27: stop_on_error = if (is.numeric(options$error)) options$error else {eval(expr, envir)}, handlers) } if (options$error && options$include) TRUE33: 0L28: }, handlers)withVisible(eval(expr, envir)) doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]])33: doWithOneRestart(return(expr), restart) 34: else 2L }, output_handler = knit_handlers(options$render, options))) 44: 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart)eng_r(options)29: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 45: block_exec(params) 36: 46: 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output()doWithOneRestart(return(expr), restart)call_block(x) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd)39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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 2L38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: 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)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) if (on_message$capture) { }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) }46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) watcher$push(cnd) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... 41: 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) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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)) { 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 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))) 44: eng_r(options) texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})45: 59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds")block_exec(params) 46: call_block(x) 47: process_group(group) An irrecoverable exception occurred. R is aborting now ... 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }) 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 50: process_file(text, output) 51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 53: vweave_rmarkdown(...) 54: engine$weave(file, quiet = quiet, encoding = enc) 55: doTryCatch(return(expr), name, parentenv, handler) 56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 57: tryCatchList(expr, classes, parentenv, handlers) 58: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpug1c2E/file2820575040be.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from predict.Rmd:91-109 [unnamed-chunk-5] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'predict.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘predict.Rmd’ --- re-building ‘summarizing_results.Rmd’ using rmarkdown --- finished re-building ‘summarizing_results.Rmd’ --- re-building ‘utility_models.Rmd’ using rmarkdown --- finished re-building ‘utility_models.Rmd’ SUMMARY: processing the following files failed: ‘basic_usage.Rmd’ ‘mnl_models.Rmd’ ‘mnl_models_weighted.Rmd’ ‘predict.Rmd’ Error: Vignette re-building failed. Execution halted Flavor: r-release-macos-arm64