Running ‘test-all.R’ [8s/28s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library(testthat)
  > test_check("RNiftyReg")
  Loading required package: RNiftyReg
  
   *** caught segfault ***
  address 21c, cause 'memory not mapped'
  
  Traceback:
   1: asNifti.default(object, internal = TRUE)
   2: asNifti(object, internal = TRUE)
   3: retrieveNifti(source)
   4: niftyreg.linear(source, target, scope, init, sourceMask, targetMask,     interpolation = interpolation, symmetric = symmetric, estimateOnly = estimateOnly,     sequentialInit = sequentialInit, internal = internal, precision = precision,     threads = threads, ...)
   5: niftyreg(skewedHouse, house, symmetric = FALSE)
   6: eval(code, test_env)
   7: eval(code, test_env)
   8: 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)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  12: doTryCatch(return(expr), name, parentenv, handler)
  13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  14: tryCatchList(expr, classes, parentenv, handlers)
  15: 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) {    })
  16: test_code(desc, code, env = parent.frame())
  17: test_that("Core registration functions work", {    options(RNiftyReg.threads = 2L)    if (system.file(package = "loder") == "")         skip("The \"loder\" package is not available")    else {        house <- loder::readPng(system.file("extdata", "house.png",             package = "RNiftyReg"))        affine <- buildAffine(skews = 0.1, source = house, target = house)        skewedHouse <- applyTransform(affine, house)        reg <- niftyreg(skewedHouse, house, symmetric = FALSE)        expect_that(forward(reg)[1, 2], equals(0.1, tolerance = 0.1))        reg <- niftyreg(skewedHouse, house, symmetric = TRUE)        expect_that(forward(reg)[1, 2], equals(0.1, tolerance = 0.1))        expect_that(invertAffine(forward(reg)), equals(reverse(reg),             tolerance = 1e-04, check.attributes = FALSE))        expect_that(similarity(skewedHouse, house), is_less_than(similarity(reg$image,             house)))        skip_on_cran()        skip_on_travis()        reg <- niftyreg(skewedHouse, house, scope = "nonlinear",             init = forward(reg))        expect_that(dim(forward(reg)), equals(c(47L, 59L, 1L,             1L, 2L)))    }})
  18: eval(code, test_env)
  19: eval(code, test_env)
  20: 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)
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  24: doTryCatch(return(expr), name, parentenv, handler)
  25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  26: tryCatchList(expr, classes, parentenv, handlers)
  27: 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) {    })
  28: test_code(NULL, exprs, env)
  29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  30: force(code)
  31: doWithOneRestart(return(expr), restart)
  32: withOneRestart(expr, restarts[[1L]])
  33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  34: 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()    })
  35: FUN(X[[i]], ...)
  36: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  37: force(code)
  38: doWithOneRestart(return(expr), restart)
  39: withOneRestart(expr, restarts[[1L]])
  40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  41: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  43: 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)
  44: 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)
  45: test_check("RNiftyReg")
  An irrecoverable exception occurred. R is aborting now ...