Running ‘testthat.R’ [33s/37s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggPMX)
  > 
  > test_check("ggPMX")
  
   *** caught segfault ***
  address 0x10, cause 'memory not mapped'
  
  Traceback:
   1: foceiFitCpp_(.ret)
   2: doTryCatch(return(expr), name, parentenv, handler)
   3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   4: tryCatchList(expr, classes, parentenv, handlers)
   5: tryCatch({    foceiFitCpp_(.ret)}, error = function(e) {    if (regexpr("theta reset", e$message) != -1) {        assign("zeroOuter", FALSE, this.env)        assign("zeroGrad", FALSE, this.env)        if (regexpr("theta reset0", e$message) != -1) {            assign("zeroGrad", TRUE, this.env)        }        else if (regexpr("theta resetZ", e$message) != -1) {            assign("zeroOuter", TRUE, this.env)        }        assign("err", "theta reset", this.env)    }    else {        assign("err", e$message, this.env)    }})
   6: .foceiFitInternal(.env)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, classes, parentenv, handlers)
  10: 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))})
  11: try(.foceiFitInternal(.env))
  12: .foceiFamilyReturn(env, .ui, ..., est = "posthoc")
  13: nlmixr2Est.posthoc(env, ...)
  14: nlmixr2Est(env, ...)
  15: withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)})
  16: withCallingHandlers(expr, warning = function(w) if (inherits(w,     classes)) tryInvokeRestart("muffleWarning"))
  17: suppressWarnings(withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)}))
  18: .collectWarnings(nlmixr2Est(env, ...), lst = TRUE)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: 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))})
  23: try(.collectWarnings(nlmixr2Est(env, ...), lst = TRUE))
  24: assign("ret", try(.collectWarnings(nlmixr2Est(env, ...), lst = TRUE)),     envir = .envReset)
  25: nlmixr2Est0(.env)
  26: nlmixr2.function(object = object, data = data, est = est, control = control,     table = table, ..., save = save, envir = envir)
  27: nlmixr2est::nlmixr2(object = object, data = data, est = est,     control = control, table = table, ..., save = save, envir = envir)
  28: nlmixr2::nlmixr2(fun, df, list(print = 0), est = "posthoc")
  29: eval(code, test_env)
  30: eval(code, test_env)
  31: 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)
  32: doTryCatch(return(expr), name, parentenv, handler)
  33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  34: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  35: doTryCatch(return(expr), name, parentenv, handler)
  36: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  37: tryCatchList(expr, classes, parentenv, handlers)
  38: 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) {    })
  39: test_code(desc, code, env = parent.frame(), reporter = reporter)
  40: test_that("nlmixr test", {    df <- tibble::tibble(ID = c(rep(1, 6), rep(2, 6)), TIME = c(0,         12.11, 18.41, 23.89, 36, 43.51, 0, 12, 20, 24, 36.8,         45), AMT = c(1000, 1000, NA, 1000, 1000, NA, 1000, 2000,         NA, 1000, 1000, NA), DUR = c(2.5, 2.5, NA, 2.5, 2.5,         NA, 2.5, 2.5, NA, 2.5, 2.5, NA), DV = c(NA, NA, 3, NA,         NA, 9.6, NA, NA, 7, NA, NA, 2.8), WT = c(rep(55, 6),         rep(48, 6))) %>% dplyr::mutate(EVID = ifelse(is.na(DV),         1, 0))    fun <- function() {        ini({            tvCl <- c(0, 4, Inf)            tvVc <- c(0, 48, Inf)            eta.Vc ~ 0.62            prop.sd <- 0.051529        })        model({            Cl <- tvCl            Vc <- tvVc * (WT/70) * exp(eta.Vc)            linCmt() ~ prop(prop.sd)        })    }    fit <- nlmixr2::nlmixr2(fun, df, list(print = 0), est = "posthoc")    expect_error(pmx_nlmixr(fit), NA)})
  41: eval(code, test_env)
  42: eval(code, test_env)
  43: 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)
  44: doTryCatch(return(expr), name, parentenv, handler)
  45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  46: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  47: doTryCatch(return(expr), name, parentenv, handler)
  48: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  49: tryCatchList(expr, classes, parentenv, handlers)
  50: 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) {    })
  51: test_code(NULL, exprs, env)
  52: source_file(path, child_env(env), wrap = wrap)
  53: FUN(X[[i]], ...)
  54: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  55: doTryCatch(return(expr), name, parentenv, handler)
  56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  57: tryCatchList(expr, classes, parentenv, handlers)
  58: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  59: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  60: 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)
  61: 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)
  62: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  63: test_check("ggPMX")
  An irrecoverable exception occurred. R is aborting now ...