Running ‘testthat.R’ [61s/74s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(RxODE)
  > test_check("RxODE")
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: setPrimitiveMethods(f, deflt, "set", fdef, methods)
   2: cacheGenericsMetaData(f, fdef, attach, where, fdef@package, methods)
   3: Recall(ff, ffdef, attach, where, methods = .getMethodsTable(ffdef))
   4: cacheGenericsMetaData(f, fdef, attach, where, fdef@package, methods)
   5: Recall(ff, ffdef, attach, where, methods = .getMethodsTable(ffdef))
   6: cacheGenericsMetaData(f, fdef, attach, where, fdef@package, methods)
   7: methods::cacheMetaData(ns, TRUE, ns)
   8: loadNamespace(name)
   9: getNamespace(ns)
  10: asNamespace(ns)
  11: getExportedValue(pkg, name)
  12: cli::rule
  13: .badBuild("Error building model")
  14: rxCompile.rxModelVars(.mv, dir = mdir, extraC = extraC, debug = debug,     modName = modName, package = NULL)
  15: RxODE::rxCompile(.mv, dir = mdir, extraC = extraC, debug = debug,     modName = modName, package = NULL)
  16: eval(substitute(expr), data, enclos = parent.frame())
  17: eval(substitute(expr), data, enclos = parent.frame())
  18: with.default(<environment>, {    .lwd <- getwd()    if (!file.exists(wd))         dir.create(wd, recursive = TRUE)    if (file.exists(wd))         setwd(wd)    on.exit(setwd(.lwd))    if (missing.modName) {        .rxDll <- RxODE::rxCompile(.mv, extraC = extraC, debug = debug,             package = NULL)    }    else {        .rxDll <- RxODE::rxCompile(.mv, dir = mdir, extraC = extraC,             debug = debug, modName = modName, package = NULL)    }    assign("rxDll", .rxDll, envir = <environment>)    assign(".mv", .rxDll$modVars, envir = <environment>)})
  19: with(<environment>, {    .lwd <- getwd()    if (!file.exists(wd))         dir.create(wd, recursive = TRUE)    if (file.exists(wd))         setwd(wd)    on.exit(setwd(.lwd))    if (missing.modName) {        .rxDll <- RxODE::rxCompile(.mv, extraC = extraC, debug = debug,             package = NULL)    }    else {        .rxDll <- RxODE::rxCompile(.mv, dir = mdir, extraC = extraC,             debug = debug, modName = modName, package = NULL)    }    assign("rxDll", .rxDll, envir = <environment>)    assign(".mv", .rxDll$modVars, envir = <environment>)})
  20: .env$compile()
  21: RxODE(model = ode, modName = "m1", wd = "/tmp")
  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())
  33: test_that("Issue #56", {    skip_on_os("windows")    if (!dir.exists("/tmp/")) {        skip()    }    ode <- " d/dt(test) = 0; "    m1 <- RxODE(model = ode, modName = "m1", wd = "/tmp")    expect_true(dir.exists("/tmp/m1.d"))    rxDelete(m1)    unlink("/tmp/m1.d", recursive = TRUE)})
  34: eval(substitute(expr), envir = parent.frame(1))
  35: eval(substitute(expr), envir = parent.frame(1))
  36: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  37: suppressMessages(eval(substitute(expr), envir = parent.frame(1)))
  38: (function (expr, op.rx = NULL, silent = .isTestthat(), respect = FALSE,     rxclean = .isTestthat(), cran = FALSE, on.validate = FALSE) {    rxSetSilentErr(1L)    on.exit(rxSetSilentErr(0L))    do.it <- TRUE    if (!identical(Sys.getenv("NOT_CRAN"), "true") && !cran) {        do.it <- FALSE    }    if (is(on.validate, "character")) {        val.txt <- on.validate        on.validate <- TRUE    }    else {        val.txt <- "RxODE_VALIDATION_FULL"    }    if (on.validate && !identical(Sys.getenv(val.txt), "true")) {        do.it <- FALSE    }    if (!on.validate && identical(Sys.getenv(val.txt), "true")) {        do.it <- FALSE    }    if (do.it) {        if (missing(expr) && is.null(op.rx)) {            op <- options()            op <- op[regexpr(rex::rex("RxODE."), names(op)) !=                 -1]            op <- op[order(names(op))]            sapply(names(op), function(n) {                rxCat(sprintf("%s: %s\n", n, op[[n]]))            })            return(invisible(op))        }        else {            if (is(op.rx, "character")) {                if (op.rx == "strict") {                  op.rx <- 1                }                else {                  op.rx <- 2                }            }            if (is(op.rx, "numeric")) {                if (op.rx <= 2) {                  x <- op.rx                  op.rx <- list()                  for (v in names(rxOpt)) {                    op.rx[[v]] <- rxOpt[[v]][x]                  }                }            }            if (!missing(silent)) {                op.rx$RxODE.verbose = !silent                op.rx$RxODE.suppress.syntax.info = silent            }            if (!missing(expr)) {                if (rxclean) {                  rxClean()                }                opOld <- options()                .oldProg <- getProgSupported()                if (silent) {                  setProgSupported(-1)                }                on.exit({                  options(opOld)                  setProgSupported(.oldProg)                  rxSyncOptions()                  if (rxclean) {                    rxClean()                  }                })            }            if (respect) {                op <- options()                w <- !(names(op.rx) %in% names(op))                if (any(w))                   options(op.rx[w])                rxSyncOptions()            }            else if (length(op.rx) > 0) {                options(op.rx)                rxSyncOptions()            }            if (is(substitute(expr), "{")) {                if (silent) {                  return(suppressMessages(eval(substitute(expr),                     envir = parent.frame(1))))                }                else {                  return(eval(substitute(expr), envir = parent.frame(1)))                }            }        }    }})(expr = {    context("Absolute Working Directory + Model Name (Issue #56)")    test_that("Issue #56", {        skip_on_os("windows")        if (!dir.exists("/tmp/")) {            skip()        }        ode <- " d/dt(test) = 0; "        m1 <- RxODE(model = ode, modName = "m1", wd = "/tmp")        expect_true(dir.exists("/tmp/m1.d"))        rxDelete(m1)        unlink("/tmp/m1.d", recursive = TRUE)    })}, silent = TRUE, cran = TRUE, op.rx = 2)
  39: do.call(getFromNamespace("rxOptions", "RxODE"), args, envir = parent.frame(1))
  40: rxPermissive({    context("Absolute Working Directory + Model Name (Issue #56)")    test_that("Issue #56", {        skip_on_os("windows")        if (!dir.exists("/tmp/")) {            skip()        }        ode <- " d/dt(test) = 0; "        m1 <- RxODE(model = ode, modName = "m1", wd = "/tmp")        expect_true(dir.exists("/tmp/m1.d"))        rxDelete(m1)        unlink("/tmp/m1.d", recursive = TRUE)    })}, silent = TRUE, cran = TRUE)
  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, new.env(parent = env), chdir = TRUE, wrap = wrap)
  53: force(code)
  54: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        reporter$start_file(basename(path))        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        reporter$.end_context()        reporter$end_file()    })
  55: FUN(X[[i]], ...)
  56: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  57: force(code)
  58: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  59: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  60: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  61: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  62: test_check("RxODE")
  An irrecoverable exception occurred. R is aborting now ...