Running ‘testthat.R’ [1s/1s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(cxreg)
  > 
  > test_check("cxreg")
  
   *** caught segfault ***
  address 0x27, cause 'invalid permissions'
  
  Traceback:
   1: eigen(Theta_hat)
   2: AIC(S, Theta_hat, m)
   3: cglasso.path(S, D, type, m, lambda, nlambda, lambda.min.ratio,     W.init, stopping_rule, stop_criterion, maxit = maxit, thresh = thresh,     trace.it = trace.it)
   4: cglasso(S = f_j_hat, m = m, nlambda = 20, stop_criterion = "AIC",     stopping_rule = FALSE)
   5: eval(code, test_env)
   6: eval(code, test_env)
   7: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  12: doWithOneRestart(return(expr), restart)
  13: withOneRestart(expr, restarts[[1L]])
  14: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  15: test_code(code, parent.frame())
  16: test_that("cglasso works", {    rmvnorm_manual <- function(n, p, Sigma) {        D <- chol(Sigma)        return(matrix(rnorm(n * p), ncol = p) %*% D)    }    p <- 40    n <- 500    C <- diag(0.8, p)    C[row(C) == col(C) + 1] <- -0.2    C[row(C) == col(C) - 1] <- -0.2    Sigma <- solve(C)    set.seed(1234)    X_t <- rmvnorm_manual(n, p, Sigma)    m <- floor(sqrt(n))    j <- 1    d_j <- dft.j(X_t, j, m)    f_j_hat <- t(d_j) %*% Conj(d_j)/(2 * m + 1)    fit <- cglasso(S = f_j_hat, m = m, nlambda = 20, stop_criterion = "AIC",         stopping_rule = FALSE)    expect_length(fit$stop_arr, 20)    expect_equal(fit$stop_criterion, "AIC")    expect_true(is.numeric(fit$min_index))    expect_length(fit$lambda_grid, 20)    expect_true(is.list(fit$Theta_list))    expect_equal(fit$type, "I")    expect_true(is.matrix(fit$D))})
  17: eval(code, test_env)
  18: eval(code, test_env)
  19: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  20: doTryCatch(return(expr), name, parentenv, handler)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: tryCatchList(expr, classes, parentenv, handlers)
  23: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  24: doWithOneRestart(return(expr), restart)
  25: withOneRestart(expr, restarts[[1L]])
  26: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  27: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  28: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  29: FUN(X[[i]], ...)
  30: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  33: tryCatchList(expr, classes, parentenv, handlers)
  34: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  35: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  36: 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, shuffle = shuffle,     error_call = error_call)
  37: 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, shuffle = shuffle)
  38: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  39: test_check("cxreg")
  An irrecoverable exception occurred. R is aborting now ...