Running ‘testthat.R’ [26s/43s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ### to also run skip_on_cran() tests, uncomment:
  > #Sys.setenv(NOT_CRAN="true")
  > 
  > library(testthat)
  > library(metafor)
  Loading required package: Matrix
  Loading 'metafor' package (version 1.9-9). For an overview 
  and introduction to the package please type: help(metafor).
  > test_check("metafor")
  
   *** caught segfault ***
  address 100001a, cause 'memory not mapped'
  
  Traceback:
   1: .Call(glmerAGQ, pp$ptr(), resp$ptr(), tol, as.integer(maxit),     GQmat, grpFac, verbose)
   2: pwrssUpdate(pp, resp, tol = tolPwrss, GQmat = GQmat, compDev = compDev,     grpFac = fac, maxit = maxit, verbose = verbose)
   3: fun(xss, ...)
   4: deriv12(fn, opt$par, fx = opt$value)
   5: optwrap(optimizer, devfun, start, rho$lower, control = control,     adj = adj, verbose = verbose, ...)
   6: optimizeGlmer(devfun, optimizer = control$optimizer[[2]], restart_edge = control$restart_edge,     boundary.tol = control$boundary.tol, control = control$optCtrl,     start = start, nAGQ = nAGQ, verbose = verbose, stage = 2,     calc.derivs = control$calc.derivs, use.last.params = control$use.last.params)
   7: lme4::glmer(dat.grp ~ -1 + X.fit + (1 | study), offset = dat.off,     family = dat.fam, nAGQ = nAGQ, verbose = verbose, control = do.call(lme4::glmerControl,         glmerCtrl))
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: 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)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\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 && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  12: try(lme4::glmer(dat.grp ~ -1 + X.fit + (1 | study), offset = dat.off,     family = dat.fam, nAGQ = nAGQ, verbose = verbose, control = do.call(lme4::glmerControl,         glmerCtrl)), silent = !verbose)
  13: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  14: suppressMessages(try(lme4::glmer(dat.grp ~ -1 + X.fit + (1 |     study), offset = dat.off, family = dat.fam, nAGQ = nAGQ,     verbose = verbose, control = do.call(lme4::glmerControl,         glmerCtrl)), silent = !verbose))
  15: rma.glmm(measure = "PLO", xi = xi, ni = ni, mods = ~mod1, data = dat,     add = 0)
  16: withCallingHandlers(code, warning = function(condition) {    out$push(condition)    invokeRestart("muffleWarning")})
  17: capture_warnings(object)
  18: expect_warning(res <- rma.glmm(measure = "PLO", xi = xi, ni = ni,     mods = ~mod1, data = dat, add = 0))
  19: eval(expr, envir, enclos)
  20: eval(code, test_env)
  21: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  27: tryCatchList(expr, classes, parentenv, handlers)
  28: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
  29: test_code(desc, code, env = parent.frame())
  30: test_that("rma.glmm() handles NAs correctly.", {    skip_on_cran()    dat <- data.frame(ni = rep(20, 10), xi = c(NA, 4, 0, 0, 2,         2, 3, 8, 9, 2), mod1 = c(0, NA, 0, 0, 0, 0, 0, 1, 1,         1), mod2 = c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0))    expect_warning(res <- rma.glmm(measure = "PLO", xi = xi,         ni = ni, mods = ~mod1, data = dat))    expect_equivalent(res$k, 8)    expect_equivalent(length(res$xi), 8)    expect_equivalent(length(res$mi), 8)    expect_equivalent(nrow(res$X), 8)    expect_equivalent(res$k.yi, 8)    expect_equivalent(length(res$yi), 8)    expect_equivalent(length(res$vi), 8)    expect_equivalent(res$k.f, 10)    expect_equivalent(length(res$xi.f), 10)    expect_equivalent(length(res$mi.f), 10)    expect_equivalent(nrow(res$X.f), 10)    expect_equivalent(length(res$yi.f), 10)    expect_equivalent(length(res$vi.f), 10)    expect_warning(res <- rma.glmm(measure = "PLO", xi = xi,         ni = ni, mods = ~mod1, data = dat, add = 0))    expect_equivalent(res$k, 8)    expect_equivalent(length(res$xi), 8)    expect_equivalent(length(res$mi), 8)    expect_equivalent(nrow(res$X), 8)    expect_equivalent(res$k.yi, 6)    expect_equivalent(length(res$yi), 6)    expect_equivalent(length(res$vi), 6)    expect_equivalent(res$k.f, 10)    expect_equivalent(length(res$xi.f), 10)    expect_equivalent(length(res$mi.f), 10)    expect_equivalent(nrow(res$X.f), 10)    expect_equivalent(length(res$yi.f), 10)    expect_equivalent(length(res$vi.f), 10)    expect_warning(res <- rma.glmm(measure = "PLO", xi = xi,         ni = ni, mods = ~mod1 + mod2, data = dat, add = 0))    expect_equivalent(res$k, 8)    expect_equivalent(length(res$xi), 8)    expect_equivalent(length(res$mi), 8)    expect_equivalent(nrow(res$X), 8)    expect_equivalent(res$k.yi, 6)    expect_equivalent(length(res$yi), 6)    expect_equivalent(length(res$vi), 6)    expect_equivalent(res$k.f, 10)    expect_equivalent(length(res$xi.f), 10)    expect_equivalent(length(res$mi.f), 10)    expect_equivalent(nrow(res$X.f), 10)    expect_equivalent(length(res$yi.f), 10)    expect_equivalent(length(res$vi.f), 10)})
  31: eval(expr, envir, enclos)
  32: eval(exprs, env)
  33: source_file(path, new.env(parent = env), chdir = TRUE)
  34: force(code)
  35: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  36: FUN(X[[i]], ...)
  37: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  38: force(code)
  39: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  40: test_files(paths, reporter = reporter, env = env, ...)
  41: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  42: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  43: run_tests(package, test_path, filter, reporter, ...)
  44: test_check("metafor")
  An irrecoverable exception occurred. R is aborting now ...