Running ‘testthat.R’ [157s/198s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > 
  > library("testthat")
  > library("sentopics")
  > 
  > if (Sys.getenv("R_COVR") != "true") {
  +   test_check("sentopics")
  + } else {
  +   test_check("sentopics", reporter = default_reporter())
  +   # test_check("sentopics", reporter = LocationReporter)
  + }
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: qatd_cpp_tokens_select(x, type, ids, 1, padding, window[1], window[2],     startpos, endpos)
   2: tokens_select.tokens(tokens, keep, selection = "keep", case_insensitive = case_insensitive,     padding = padding)
   3: quanteda::tokens_select(tokens, keep, selection = "keep", case_insensitive = case_insensitive,     padding = padding)
   4: quanteda::as.tokens(quanteda::tokens_select(tokens, keep, selection = "keep",     case_insensitive = case_insensitive, padding = padding))
   5: as.tokens.dfm(dfm, tokens = toks)
   6: as.tokens(dfm, tokens = toks)
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: 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)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  13: doTryCatch(return(expr), name, parentenv, handler)
  14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  15: tryCatchList(expr, classes, parentenv, handlers)
  16: 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) {    })
  17: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  18: test_that("as.tokens.dfm works", {    toks <- ECB_press_conferences_tokens[1:10]    dfm <- quanteda::dfm(toks, tolower = FALSE)    expect_silent(LDA <- LDA(dfm))    expect_silent(JST <- JST(dfm))    expect_silent(rJST <- rJST(dfm))    expect_silent(sentopicmodel <- sentopicmodel(dfm))    expect_identical(as.tokens(dfm, tokens = toks), toks)    dfm <- quanteda::dfm(ECB_press_conferences_tokens)    toks <- as.tokens.dfm(dfm)    expect_identical(nrow(dfm), length(toks))    expect_identical(colnames(dfm), quanteda::types(toks))    expect_equal(quanteda::rowSums(dfm), quanteda::ntoken(toks))    toks <- tokens(c("This text will be broken down into pieces with the `tokens` function",         "The function was re-exported from the quanteda package."))    dfm <- quanteda::dfm_trim(quanteda::dfm_remove(quanteda::dfm(toks),         quanteda::stopwords("en")), max_termfreq = 1)    toks_recomposed <- as.tokens(dfm, tokens = toks)    toks_processed <- quanteda::tokens_remove(toks, c(quanteda::stopwords("en"),         "function", "`"), padding = TRUE)    expect_identical(toks_recomposed, toks_processed)})
  19: eval(code, test_env)
  20: eval(code, test_env)
  21: 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)
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  27: tryCatchList(expr, classes, parentenv, handlers)
  28: 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) {    })
  29: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  30: source_file(path, env(env), wrap = wrap)
  31: FUN(X[[i]], ...)
  32: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  37: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  38: 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,     wrap = wrap, load_package = load_package)
  39: 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,     wrap = wrap, load_package = load_package, parallel = parallel)
  40: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  41: test_check("sentopics")
  An irrecoverable exception occurred. R is aborting now ...
  Warning: stack imbalance in 'lapply', 138 then 137
  Segmentation fault