Running ‘testthat.R’ [26s/44s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(ebvcube)
  > 
  > test_check("ebvcube")
  
   *** caught segfault ***
  address 0x6, cause 'memory not mapped'
  
  Traceback:
   1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: 0x14472d60>,     dll = list(name = "Rcpp", path = "/data/gannet/ripley/R/test-dev/Rcpp/libs/Rcpp.so",         dynamicLookup = TRUE, handle = <pointer: 0x1e7dbb20>,         info = <pointer: 0x1e592430>, forceSymbols = FALSE),     numParameters = -1L), <pointer: 0x1bbbd5a0>, <pointer: 0x1bbbf720>,     .pointer, ...)
   2: p@pntr$read(x, layer, query, extent, filter, proxy, what, opts)
   3: .local(x, ...)
   4: terra::vect(shp)
   5: terra::vect(shp)
   6: ebv_read_shp(filepath, datacubepath, entity = entity, shp = subset,     timestep = timestep, touches = touches, verbose = verbose)
   7: ebv_analyse(file, "metric_1/ebv_cube", "forest bird species",     1, subset = shp, verbose = FALSE)
   8: eval(code, test_env)
   9: eval(code, test_env)
  10: 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)
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  14: doTryCatch(return(expr), name, parentenv, handler)
  15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: 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) {    })
  18: test_code(desc, code, env = parent.frame(), reporter = reporter)
  19: test_that("test ebv_analyse shp", {    file <- system.file(file.path("extdata", "martins_comcom_subset.nc"),         package = "ebvcube")    shp <- system.file(file.path("extdata", "cameroon.shp"),         package = "ebvcube")    data <- ebv_analyse(file, "metric_1/ebv_cube", "forest bird species",         1, subset = shp, verbose = FALSE)    result <- list(min = -0.0031939454, q25 = 0.045318592, q50 = 0.087303236,         mean = 0.094001715, q75 = 0.142445557, max = 0.213913336,         std = 0.060112968, n = 108, NAs = 49)    expect_equal(data, result)})
  20: eval(code, test_env)
  21: eval(code, test_env)
  22: 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)
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  26: doTryCatch(return(expr), name, parentenv, handler)
  27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  28: tryCatchList(expr, classes, parentenv, handlers)
  29: 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) {    })
  30: test_code(test = NULL, code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  31: source_file(path, env = env(env), desc = desc, error_call = error_call)
  32: FUN(X[[i]], ...)
  33: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  34: doTryCatch(return(expr), name, parentenv, handler)
  35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  36: tryCatchList(expr, classes, parentenv, handlers)
  37: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  38: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  39: test_files_serial(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,     desc = desc, load_package = load_package, error_call = error_call)
  40: 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,     load_package = load_package, parallel = parallel)
  41: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  42: test_check("ebvcube")
  An irrecoverable exception occurred. R is aborting now ...