Running ‘testthat.R’ [13s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ClusterR)
  Loading required package: gtools
  > 
  > test_check("ClusterR")
  
   *** caught segfault ***
  address 2, cause 'memory not mapped'
  
  Traceback:
   1: cmpCall(e, cb, cntxt)
   2: cmp(a, cb, ncntxt)
   3: cmpBuiltinArgs(args, names, cb, cntxt)
   4: h(e, cb, cntxt)
   5: tryInline(call, cb, cntxt)
   6: cmpCall(e, cb, cntxt)
   7: cmp(e, cb, cntxt, setloc = FALSE)
   8: genCode(a, pcntxt, loc = cb$savecurloc())
   9: cb$putconst(genCode(a, pcntxt, loc = cb$savecurloc()))
  10: cmpCallArgs(args, cb, cntxt)
  11: cmpCallSymFun(fun, args, call, cb, cntxt)
  12: cmpCall(e, cb, cntxt)
  13: cmp(val, cb, ncntxt)
  14: h(e, cb, cntxt)
  15: tryInline(call, cb, cntxt)
  16: cmpCall(e, cb, cntxt)
  17: cmp(subexp, cb, cntxt, setloc = FALSE)
  18: h(e, cb, cntxt)
  19: tryInline(call, cb, cntxt)
  20: cmpCall(e, cb, cntxt)
  21: cmp(e, cb, cntxt, setloc = FALSE)
  22: genCode(body(f), ncntxt, loc = loc)
  23: cmpfun(f)
  24: doTryCatch(return(expr), name, parentenv, handler)
  25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  26: tryCatchList(expr, classes, parentenv, handlers)
  27: tryCatch(cmpfun(f), error = function(e) {    notifyCompilerError(paste(e$message, "at", deparse(e$call)))    f})
  28: compiler:::tryCmpfun(function (data, MEDOIDS = NULL, distance_metric = "euclidean",     fuzzy = FALSE, minkowski_p = 1, threads = 1) {    if (class(data) == "data.frame")         data = as.matrix(data)    if (class(data) != "matrix")         stop("data should be either a matrix or a data frame")    if (class(MEDOIDS) == "data.frame")         MEDOIDS = as.matrix(MEDOIDS)    if (is.null(MEDOIDS))         stop("the MEDOIDS should be a non-empty matrix or data frame")    if (ncol(MEDOIDS) != ncol(data))         stop("the MEDOIDS columns should be equal to the number of columns of the data")    if (!distance_metric %in% c("euclidean", "manhattan", "chebyshev",         "canberra", "braycurtis", "pearson_correlation", "simple_matching_coefficient",         "minkowski", "hamming", "jaccard_coefficient", "Rao_coefficient",         "mahalanobis"))         stop("the distance_metric should be one of 'euclidean', 'manhattan', 'chebyshev', 'canberra', 'braycurtis', 'pearson_correlation', 'simple_matching_coefficient',\n         'minkowski', 'hamming', 'jaccard_coefficient', 'Rao_coefficient', 'mahalanobis'")    if (!is.logical(fuzzy))         stop("fuzzy should be either TRUE or FALSE")    if (distance_metric == "minkowski" && minkowski_p == 0)         stop("if distance metric is minkowski then the minkowski_p should be either a positive or a negative number but not 0.0")    if (threads < 1)         stop("threads should be an integer greater than 0")    flag_non_finite = check_NaN_Inf(data)    if (!flag_non_finite)         stop("the data includes NaN's or +/- Inf values")    res = predict_medoids(data, distance_metric, MEDOIDS, minkowski_p,         threads, fuzzy, 1e-06)    return(structure(list(clusters = as.vector(res$clusters) +         1, fuzzy_clusters = res$fuzzy_clusters, dissimilarity = res$dissimilarity),         class = "cluster medoids silhouette"))})
  29: predict_Medoids(X, MEDOIDS = NULL, "euclidean", fuzzy = TRUE)
  30: doTryCatch(return(expr), name, parentenv, handler)
  31: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  32: tryCatchList(expr, classes, parentenv, handlers)
  33: tryCatch({    object    NULL}, error = function(e) {    e})
  34: testthat::expect_error(predict_Medoids(X, MEDOIDS = NULL, "euclidean",     fuzzy = TRUE))
  35: eval(code, test_env)
  36: eval(code, test_env)
  37: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
  38: doTryCatch(return(expr), name, parentenv, handler)
  39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  40: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  41: doTryCatch(return(expr), name, parentenv, handler)
  42: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  43: tryCatchList(expr, classes, parentenv, handlers)
  44: 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) {})
  45: test_code(desc, code, env = parent.frame())
  46: testthat::test_that("in case that the MEDOIDS is NULL, it returns an error",     {        testthat::expect_error(predict_Medoids(X, MEDOIDS = NULL,             "euclidean", fuzzy = TRUE))    })
  47: eval(exprs, env)
  48: eval(exprs, env)
  49: source_file(path, new.env(parent = env), chdir = TRUE)
  50: force(code)
  51: 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()    })
  52: FUN(X[[i]], ...)
  53: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  54: force(code)
  55: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  56: test_files(paths, reporter = reporter, env = env, ...)
  57: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  58: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  59: run_tests(package, test_path, filter, reporter, ...)
  60: test_check("ClusterR")
  An irrecoverable exception occurred. R is aborting now ...