Running ‘testthat.R’ [10s/363s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(nlmixr2)
  Loading required package: nlmixr2data
  > 
  > test_check("nlmixr2")
  
   *** caught segfault ***
  address (nil), cause 'memory not mapped'
  
  Traceback:
   1: .Call(`_nlmixr2est_saem_fit`, a, PACKAGE = "nlmixr2est")
   2: .model$saem_mod(.cfg)
   3: force(code)
   4: nlmixrWithTiming("saem", {    .muRefCovariateDataFrame <- ui$muRefCovariateDataFrame    if (length(timeVaryingCovariates) > 0) {        .muRefCovariateDataFrame <- .muRefCovariateDataFrame[!(.muRefCovariateDataFrame$covariate %in%             timeVaryingCovariates), ]    }    assign("muRefFinal", .muRefCovariateDataFrame, ui)    assign("timeVaryingCovariates", timeVaryingCovariates, ui)    on.exit({        if (exists("muRefFinal", envir = ui)) {            rm(list = "muRefFinal", envir = ui)        }        if (exists("timeVaryingCovariates", envir = ui)) {            rm(list = "timeVaryingCovariates", envir = ui)        }    })    .model <- ui$saemModelList    .inits <- ui$saemInit    .cfg <- .configsaem(model = .model, data = data, inits = .inits,         mcmc = rxode2::rxGetControl(ui, "mcmc", list(niter = c(200,             300), nmc = 3, nu = c(2, 2, 2))), rxControl = rxode2::rxGetControl(ui,             "rxControl", rxode2::rxControl()), distribution = "normal",         fixedOmega = ui$saemModelOmegaFixed, fixedOmegaValues = ui$saemModelOmegaFixedValues,         parHistThetaKeep = ui$saemParHistThetaKeep, parHistOmegaKeep = ui$saemParHistOmegaKeep,         seed = rxode2::rxGetControl(ui, "seed", 99), DEBUG = rxode2::rxGetControl(ui,             "DEBUG", 0), tol = rxode2::rxGetControl(ui, "tol",             1e-06), itmax = rxode2::rxGetControl(ui, "itmax",             30), type = rxode2::rxGetControl(ui, "type", "nelder-mead"),         lambdaRange = rxode2::rxGetControl(ui, "lambdaRange",             3), powRange = rxode2::rxGetControl(ui, "powRange",             10), odeRecalcFactor = rxode2::rxGetControl(ui, "odeRecalcFactor",             10^0.5), maxOdeRecalc = rxode2::rxGetControl(ui,             "maxOdeRecalc", 10^0.5), nres = ui$saemModNumEst,         perSa = rxode2::rxGetControl(ui, "perSa", 0.75), perNoCor = rxode2::rxGetControl(ui,             "perNoCor", 0.75), perFixOmega = rxode2::rxGetControl(ui,             "perFixOmega", 0.1), perFixResid = rxode2::rxGetControl(ui,             "perFixResid", 0.1), resFixed = ui$saemResFixed)    .print <- rxode2::rxGetControl(ui, "print", 1)    if (inherits(.print, "numeric")) {        .cfg$print <- as.integer(.print)    }    .cfg$cres <- ui$saemCres    .cfg$yj <- ui$saemYj    .cfg$lres <- ui$saemLres    .cfg$low <- ui$saemLow    .cfg$hi <- ui$saemHi    .cfg$propT <- ui$saemPropT    .cfg$addProp <- ui$saemAddProp    .cfg$resValue <- ui$saemResValue    if (.cfg$print > 0) {        message("params:\t", paste(ui$saemParHistNames, collapse = "\t"))    }    .saemCheckCfg(.cfg)    .model$saem_mod(.cfg)})
   5: .saemFitModel(.ui, .ret$dataSav, timeVaryingCovariates = .tv)
   6: .saemFamilyFit(env, ...)
   7: nlmixr2Est.saem(env, ...)
   8: nlmixr2Est(env, ...)
   9: withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)})
  10: withCallingHandlers(expr, warning = function(w) if (inherits(w,     classes)) tryInvokeRestart("muffleWarning"))
  11: suppressWarnings(withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)}))
  12: .collectWarnings(nlmixr2Est(env, ...), lst = TRUE)
  13: doTryCatch(return(expr), name, parentenv, handler)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: tryCatchList(expr, classes, parentenv, handlers)
  16: 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))})
  17: try(.collectWarnings(nlmixr2Est(env, ...), lst = TRUE))
  18: assign("ret", try(.collectWarnings(nlmixr2Est(env, ...), lst = TRUE)),     envir = .envReset)
  19: nlmixr2Est0(.env)
  20: nlmixr2.function(one.compartment, theo_sd, est = "saem", control = list(print = 0))
  21: nlmixr(one.compartment, theo_sd, est = "saem", control = list(print = 0))
  22: eval(code, test_env)
  23: eval(code, test_env)
  24: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  28: doTryCatch(return(expr), name, parentenv, handler)
  29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  30: tryCatchList(expr, classes, parentenv, handlers)
  31: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  32: test_code(desc, code, env = parent.frame(), reporter = reporter)
  33: test_that("basic nlmixr tests", {    one.compartment <- function() {        ini({            tka <- 0.45            tcl <- 1            tv <- 3.45            eta.ka ~ 0.6            eta.cl ~ 0.3            eta.v ~ 0.1            add.sd <- 0.7        })        model({            ka <- exp(tka + eta.ka)            cl <- exp(tcl + eta.cl)            v <- exp(tv + eta.v)            d/dt(depot) = -ka * depot            d/dt(center) = ka * depot - cl/v * center            cp = center/v            cp ~ add(add.sd)        })    }    expect_true(inherits(nlmixr(one.compartment), "rxUi"))    expect_true(inherits(nlmixr2(one.compartment), "rxUi"))    fit <- nlmixr(one.compartment, theo_sd, est = "saem", control = list(print = 0))    expect_true(inherits(fit, "nlmixr2FitData"))    expect_error(plot(fit), NA)})
  34: eval(code, test_env)
  35: eval(code, test_env)
  36: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  37: doTryCatch(return(expr), name, parentenv, handler)
  38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  39: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  40: doTryCatch(return(expr), name, parentenv, handler)
  41: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  42: tryCatchList(expr, classes, parentenv, handlers)
  43: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  44: test_code(NULL, exprs, env)
  45: source_file(path, child_env(env), wrap = wrap)
  46: FUN(X[[i]], ...)
  47: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  48: doTryCatch(return(expr), name, parentenv, handler)
  49: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  50: tryCatchList(expr, classes, parentenv, handlers)
  51: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  52: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  53: test_files(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package)
  54: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package, parallel = parallel)
  55: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  56: test_check("nlmixr2")
  An irrecoverable exception occurred. R is aborting now ...