Running ‘testthat.R’ [245s/397s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(duckplyr)
  Loading required package: dplyr
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  The duckplyr package is configured to fall back to dplyr when it encounters an
  incompatibility. Fallback events can be collected and uploaded for analysis to
  guide future development. By default, data will be collected but no data will
  be uploaded.
  ℹ Automatic fallback uploading is not controlled and therefore disabled, see
    `?duckplyr::fallback()`.
  ✔ Number of reports ready for upload: 2.
  → Review with `duckplyr::fallback_review()`, upload with
    `duckplyr::fallback_upload()`.
  ℹ Configure automatic uploading with `duckplyr::fallback_config()`.
  ✔ Overwriting dplyr methods with duckplyr methods.
  ℹ Turn off with `duckplyr::methods_restore()`.
  > 
  > test_check("duckplyr")
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: rapi_execute(stmt, arrow, integer64)
   2: withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }})
   3: doTryCatch(return(expr), name, parentenv, handler)
   4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   5: tryCatchList(expr, classes, parentenv, handlers)
   6: tryCatch(withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }}), stackOverflowError = handlers[[1L]])
   7: rlang::try_fetch(rapi_execute(stmt, arrow, integer64), error = function(e) {    rethrow_error_from_rapi(e, call)})
   8: rethrow_rapi_execute(res@stmt_lst$ref, res@arrow, res@connection@bigint ==     "integer64")
   9: duckdb_execute(res)
  10: duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)
  11: .local(conn, statement, ...)
  12: dbSendQuery(conn, statement, ...)
  13: dbSendQuery(conn, statement, ...)
  14: dbSendStatement(conn, statement, ...)
  15: dbSendStatement(conn, statement, ...)
  16: DBI::dbExecute(con, sql)
  17: DBI::dbExecute(con, sql)
  18: db_exec("LOAD json")
  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(desc, code, env = parent.frame(), reporter = reporter)
  30: test_that("Reading from JSON works", {    df <- tibble(a = 1:2, b = c("x", "y"))    path_json <- withr::local_tempfile(fileext = ".json")    writeLines("[{\"a\": 1, \"b\": \"x\"}, {\"a\": 2, \"b\": \"y\"}]",         path_json)    db_exec("INSTALL json")    db_exec("LOAD json")    out <- read_json_duckdb(path_json)    expect_equal(collect(out), df)})
  31: eval(code, test_env)
  32: eval(code, test_env)
  33: 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)
  34: doTryCatch(return(expr), name, parentenv, handler)
  35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  36: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  37: doTryCatch(return(expr), name, parentenv, handler)
  38: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  39: tryCatchList(expr, classes, parentenv, handlers)
  40: 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) {    })
  41: test_code(test = NULL, code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  42: source_file(path, env = env(env), desc = desc, error_call = error_call)
  43: FUN(X[[i]], ...)
  44: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  45: doTryCatch(return(expr), name, parentenv, handler)
  46: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  47: tryCatchList(expr, classes, parentenv, handlers)
  48: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  49: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  50: 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)
  51: 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)
  52: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  53: test_check("duckplyr")
  An irrecoverable exception occurred. R is aborting now ...