Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(VAJointSurv)
  Loading required package: survival
  > 
  > options(testthat.progress.max_fails = 1000)
  > test_check("VAJointSurv")
  
   *** caught segfault ***
  address 0x1, cause 'memory not mapped'
  
  Traceback:
   1: eval_expansion(ptr, x, weights, der, lower_limit)
   2: obj_cpp$eval(out_x)
   3: eval(code, test_env)
   4: eval(code, test_env)
   5: 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)
   6: doTryCatch(return(expr), name, parentenv, handler)
   7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: 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) {    })
  13: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  14: test_that("The C++ version of poly gives the right result", {    in_x <- 2:5    obj_truth <- poly(in_x, degree = 3)    out_x <- 1:6    truth <- predict(obj_truth, out_x)    obj_cpp <- poly_term(in_x, degree = 3)    expect_s3_class(obj_cpp, "poly_term")    expect_equal(obj_cpp$time, in_x)    expansion <- obj_cpp$eval(out_x)    expect_equal(expansion, t(truth), ignore_attr = TRUE)    obj_cpp <- poly_term(in_x, degree = 3, intercept = TRUE)    expect_s3_class(obj_cpp, "poly_term")    expect_equal(obj_cpp$time, in_x)    expansion <- obj_cpp$eval(out_x)    expect_equal(expansion, rbind(1, t(truth)), ignore_attr = TRUE)    obj_cpp <- poly_term(in_x, degree = 3, raw = TRUE)    expect_s3_class(obj_cpp, "poly_term")    expect_equal(obj_cpp$time, in_x)    expansion <- obj_cpp$eval(out_x)    expect_equal(expansion, t(outer(out_x, 1:3, `^`)))    obj_cpp <- poly_term(in_x, degree = 3, raw = TRUE, intercept = TRUE)    expect_s3_class(obj_cpp, "poly_term")    expect_equal(obj_cpp$time, in_x)    expansion <- obj_cpp$eval(out_x)    expect_equal(expansion, t(outer(out_x, 0:3, `^`)))    obj_cpp <- poly_term(in_x, degree = 0)    expect_s3_class(obj_cpp, "poly_term")    expect_equal(obj_cpp$time, in_x)    expansion <- obj_cpp$eval(out_x)    expect_equal(expansion, matrix(0, 0, length(out_x)))    obj_cpp <- poly_term(in_x, degree = 0, intercept = TRUE)    expect_s3_class(obj_cpp, "poly_term")    expect_equal(obj_cpp$time, in_x)    expansion <- obj_cpp$eval(out_x)    expect_equal(expansion, matrix(1, 1, length(out_x)))})
  15: eval(code, test_env)
  16: eval(code, test_env)
  17: 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)
  18: doTryCatch(return(expr), name, parentenv, handler)
  19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: 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) {    })
  25: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  26: source_file(path, env = env(env), desc = desc, error_call = error_call)
  27: FUN(X[[i]], ...)
  28: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  29: doTryCatch(return(expr), name, parentenv, handler)
  30: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  31: tryCatchList(expr, classes, parentenv, handlers)
  32: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  33: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  34: 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)
  35: 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)
  36: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  37: test_check("VAJointSurv")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault