Running ‘test-all.R’ [2s/15s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library(testthat)
  > test_check("RNiftyReg")
  Loading required package: RNiftyReg
  ** invalid dim[0], dim[] =  0 1 0 -1 -51304224 0 -1 -51303600
  ** invalid dim[0], dim[] =  0 1 0 -1 -51304224 0 -1 -51303600
  
   *** caught segfault ***
  address f0aad858, cause 'memory not mapped'
  
  Traceback:
   1: .Call("regLinear", source, target, ifelse(scope == "affine",     1L, 0L), symmetric, nLevels, maxIterations, useBlockPercentage,     interpolation, sourceMask, targetMask, init, verbose, estimateOnly,     sequentialInit, internal, PACKAGE = "RNiftyReg")
   2: niftyreg.linear(x, target, "affine", init = transform, nLevels = 0L,     interpolation = interpolation, verbose = FALSE, estimateOnly = FALSE,     internal = internal)
   3: applyTransform(affine, house)
   4: eval(expr, envir, enclos)
   5: eval(code, test_env)
   6: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: 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) {})
  14: test_code(desc, code, env = parent.frame())
  15: test_that("Core registration functions work", {    if (system.file(package = "png") == "")         skip("The \"png\" package is not available")    else {        house <- png::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()        reg <- niftyreg(skewedHouse, house, scope = "nonlinear",             init = forward(reg))        expect_that(dim(forward(reg)), equals(c(47L, 59L, 1L,             1L, 2L)))    }})
  16: eval(expr, envir, enclos)
  17: eval(exprs, env)
  18: source_file(path, new.env(parent = env), chdir = TRUE)
  19: force(code)
  20: 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()    })
  21: FUN(X[[i]], ...)
  22: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  23: force(code)
  24: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  25: test_files(paths, reporter = reporter, env = env, ...)
  26: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  27: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  28: run_tests(package, test_path, filter, reporter, ...)
  29: test_check("RNiftyReg")
  An irrecoverable exception occurred. R is aborting now ...