Running ‘testthat.R’ [15s/40s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # Had the same issue as in this thread: https://github.com/hadley/testthat/issues/86
  > Sys.setenv("R_TESTS" = "")
  > 
  > options(deparse.max.lines = 5)
  > 
  > testthat::test_check("dynamichazard", reporter = "summary")
  Loading required package: dynamichazard
  Loading required package: survival
  Tracing function "expect_known_value" in package "testthat"
  Tracing function "expect_known_output" in package "testthat"
  Loading required package: DBI
  Running tests for GMA: ..................
  Testing LAPACK wrapper functions: ..........................................
  Running test_PF: ........................................................................................................................................................................................................SS...SSSSSSS..S
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: PF_smooth(n_fixed_terms_in_state_vec = static_args$n_fixed_terms_in_state_vec,     X = static_args$X, fixed_terms = static_args$fixed_terms,     tstart = static_args$tstart, tstop = static_args$tstop, Q_0 = 0.2000200020002,     Q = 0.2, a_0 = 0, R = model_args$R, risk_obj = static_args$risk_obj,     n_max = control$n_max, n_threads = control$n_threads, N_fw_n_bw = control$N_fw_n_bw,   ...
   2: eval(fit_call, envir = parent.frame())
   3: eval(fit_call, envir = parent.frame())
   4: .PF_EM(trace = trace, seed = seed, fixed_parems = fixed_parems,     type = type, n_fixed_terms_in_state_vec = static_args$n_fixed_terms_in_state_vec,     X = static_args$X, fixed_terms = static_args$fixed_terms,     tstart = static_args$tstart, tstop = static_args$tstop, risk_obj = static_args$risk_obj,     debug = static_args$debug, model = static_args$model, Q = model_args$Q,   ...
   5: PF_EM(Surv(start, stop, event) ~ ddFixed(group) + ddFixed_intercept(TRUE),     head_neck_cancer, Q_0 = 1, Q = 0.2, Fmat = diag(0.01, 1),     by = 1, type = "VAR", model = "logit", max_T = 30, control = PF_control(N_fw_n_bw = 50,         N_smooth = 100, N_first = 500, eps = 0.001, method = "AUX_normal_approx_w_cloud_mean",         n_max = 2, smoother = "Fearnhead_O_N", Q_tilde = diag(0.3^2,   ...
   6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
   7: suppressWarnings(PF_EM(Surv(start, stop, event) ~ ddFixed(group) +     ddFixed_intercept(TRUE), head_neck_cancer, Q_0 = 1, Q = 0.2,     Fmat = diag(0.01, 1), by = 1, type = "VAR", model = "logit",     max_T = 30, control = PF_control(N_fw_n_bw = 50, N_smooth = 100,         N_first = 500, eps = 0.001, method = "AUX_normal_approx_w_cloud_mean",   ...
   8: eval(code, test_env)
   9: eval(code, test_env)
  10: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }  ...
  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()    }  ...
  18: test_code(desc, code, env = parent.frame())
  19: test_that("type = 'VAR' works with non-zero mean for with a single term and gives previous results",     {        set.seed(30520116)        pf_Fear <- suppressWarnings(PF_EM(Surv(start, stop, event) ~             ddFixed(group) + ddFixed_intercept(TRUE), head_neck_cancer,   ...
  20: eval(code, test_env)
  21: eval(code, test_env)
  22: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }  ...
  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()    }  ...
  30: test_code(NULL, exprs, env)
  31: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  32: force(code)
  33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)  ...
  34: FUN(X[[i]], ...)
  35: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  36: force(code)
  37: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  39: 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)
  40: 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)
  41: testthat::test_check("dynamichazard", reporter = "summary")
  An irrecoverable exception occurred. R is aborting now ...