Skip to content

revdeps segfault after fwrite modifications #6857

@tdhock

Description

@tdhock

revdep check machine says that #6853 is causing a segfault in a few different packages.

https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2025-03-09/PeakSegDisk.txt

* checking tests ...
  Running 'testthat.R'/home/th798/R/R-devel/bin/BATCH: line 60: 370750 Segmentation fault      (core dumped) ${R_HOME}/bin/R -f ${in} ${opts} ${R_BATCH_OPTIONS} > ${out} 2>&1

 ERROR
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > if(require("testthat")){
  +   suite <- Sys.getenv("TEST_SUITE")
  +   if(suite=="")suite <- NULL
  +   test_check("PeakSegDisk", filter=suite)
  + }
  Loading required package: testthat
  Loading required package: PeakSegDisk
  
   *** caught segfault ***
  address 0x17f2785d0, cause 'memory not mapped'
  
  Traceback:
   1: fwrite(cov.dt, coverage.bedGraph, sep = "\t", row.names = FALSE,     col.names = FALSE)
   2: eval(code, test_env)
   3: eval(code, test_env)
   4: 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)
   5: doTryCatch(return(expr), name, parentenv, handler)
   6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: 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) {    })
  12: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  13: source_file(path, env = env(env), desc = desc, error_call = error_call)
  14: FUN(X[[i]], ...)
  15: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  16: doTryCatch(return(expr), name, parentenv, handler)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: tryCatchList(expr, classes, parentenv, handlers)
  19: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  20: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  21: 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)
  22: 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)
  23: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  24: test_check("PeakSegDisk", filter = suite)
  An irrecoverable exception occurred. R is aborting now ...
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... ERROR
Error(s) in re-building vignettes:
--- re-building 'Examples.Rnw' using knitr
--- finished re-building 'Examples.Rnw'

sh: line 1: 374822 Segmentation fault      (core dumped) '/home/th798/R/R-devel/bin/R' --vanilla --no-echo > '/tmp/th798/15881333/RtmpUYLdEQ/file5aa765219df40' 2>&1 < '/tmp/th798/15881333/RtmpUYLdEQ/file5aa763c16748e'
--- re-building 'Spatial_correlation.Rmd' using knitr

 *** caught segfault ***
address 0x160ba1180, cause 'memory not mapped'

Traceback:
 1: fwrite(.SD[, list(chrom, chromStart, chromEnd, count)], coverage.bedGraph,     sep = "\t", quote = FALSE, col.names = FALSE)
 2: `[.data.table`(seq.dt, , {    data.dir <- file.path(tempdir(), bases.counted, experiment)    dir.create(data.dir, showWarnings = FALSE, recursive = TRUE)    coverage.bedGraph <- file.path(data.dir, "coverage.bedGraph")    fwrite(.SD[, .(chrom, chromStart, chromEnd, count)], coverage.bedGraph,         sep = "\t", quote = FALSE, col.names = FALSE)    fit <- PeakSegDisk::sequentialSearch_dir(data.dir, 2L, verbose = 1)    data.table(fit$segments, data.type = "model")}, by = list(bases.counted, experiment))
 3: seq.dt[, {    data.dir <- file.path(tempdir(), bases.counted, experiment)    dir.create(data.dir, showWarnings = FALSE, recursive = TRUE)    coverage.bedGraph <- file.path(data.dir, "coverage.bedGraph")    fwrite(.SD[, .(chrom, chromStart, chromEnd, count)], coverage.bedGraph,         sep = "\t", quote = FALSE, col.names = FALSE)    fit <- PeakSegDisk::sequentialSearch_dir(data.dir, 2L, verbose = 1)    data.table(fit$segments, data.type = "model")}, by = list(bases.counted, experiment)]
 4: eval(expr, envir)
 5: eval(expr, envir)
 6: withVisible(eval(expr, envir))
 7: withCallingHandlers(code, message = function (cnd) {    watcher$capture_plot_and_output()    if (on_message$capture) {        watcher$push(cnd)    }    if (on_message$silence) {        invokeRestart("muffleMessage")    }}, warning = function (cnd) {    if (getOption("warn") >= 2 || getOption("warn") < 0) {        return()    }    watcher$capture_plot_and_output()    if (on_warning$capture) {        cnd <- sanitize_call(cnd)        watcher$push(cnd)    }    if (on_warning$silence) {        invokeRestart("muffleWarning")    }}, error = function (cnd) {    watcher$capture_plot_and_output()    cnd <- sanitize_call(cnd)    watcher$push(cnd)    switch(on_error, continue = invokeRestart("eval_continue"),         stop = invokeRestart("eval_stop"), error = invokeRestart("eval_error",             cnd))})
 8: eval(call)
 9: eval(call)
10: with_handlers({    for (expr in tle$exprs) {        ev <- withVisible(eval(expr, envir))        watcher$capture_plot_and_output()        watcher$print_value(ev$value, ev$visible, envir)    }    TRUE}, handlers)
11: doWithOneRestart(return(expr), restart)
12: withOneRestart(expr, restarts[[1L]])
13: withRestartList(expr, restarts[-nr])
14: doWithOneRestart(return(expr), restart)
15: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
16: withRestartList(expr, restarts[-nr])
17: doWithOneRestart(return(expr), restart)
18: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
19: withRestartList(expr, restarts)
20: withRestarts(with_handlers({    for (expr in tle$exprs) {        ev <- withVisible(eval(expr, envir))        watcher$capture_plot_and_output()        watcher$print_value(ev$value, ev$visible, envir)    }    TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE,     eval_error = function(cnd) {        signalCondition(cnd)        stop(cnd)    })
21: evaluate::evaluate(...)
22: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options))
23: in_dir(input_dir(), expr)
24: in_input_dir(evaluate(code, envir = env, new_device = FALSE,     keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options)))
25: eng_r(options)
26: block_exec(params)
27: call_block(x)
28: process_group(group)
29: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e))
30: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)),     function(loc) {        setwd(wd)        write_utf8(res, output %n% stdout())        paste0("\nQuitting from lines ", loc)    }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
31: process_file(text, output)
32: knit(input, text = text, envir = envir, quiet = quiet)
33: (if (grepl("\\.[Rr]md$", file)) knit2html else if (grepl("\\.[Rr]rst$",     file)) knit2pandoc else knit)(file, encoding = encoding,     quiet = quiet, envir = globalenv(), ...)
34: engine$weave(file, quiet = quiet, encoding = enc)
35: doTryCatch(return(expr), name, parentenv, handler)
36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
37: tryCatchList(expr, classes, parentenv, handlers)
38: tryCatch({    engine$weave(file, quiet = quiet, encoding = enc)    setwd(startdir)    output <- find_vignette_product(name, by = "weave", engine = engine)    if (!have.makefile && vignette_is_tex(output)) {        texi2pdf(file = output, clean = FALSE, quiet = quiet)        output <- find_vignette_product(name, by = "texi2pdf",             engine = engine)    }}, error = function(e) {    OK <<- FALSE    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",         file, conditionMessage(e)))})
39: tools:::.buildOneVignette("Spatial_correlation.Rmd", "/tmp/th798/15881333/R-devel/1001/PeakSegDisk.Rcheck/vign_test/PeakSegDisk",     TRUE, FALSE, "Spatial_correlation", "", "/tmp/th798/15881333/RtmpUYLdEQ/file5aa762159a9f1.rds")
An irrecoverable exception occurred. R is aborting now ...

https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2025-03-09/TrialEmulation.txt

* checking tests ...
  Running 'testthat.R'/home/th798/R/R-devel/bin/BATCH: line 60: 855672 Segmentation fault      (core dumped) ${R_HOME}/bin/R -f ${in} ${opts} ${R_BATCH_OPTIONS} > ${out} 2>&1

 ERROR
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(TrialEmulation)
  > 
  > data.table::setDTthreads(2)
  > test_check("TrialEmulation")
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: fwrite(switch_data[trial_period == p, ], file = file_p, append = TRUE)
   2: data_extension(data = data, keeplist = c("id", "trial_period",     "followup_time", "outcome", "weight", "treatment", "X1",     "X2", "X3", "X4", "age_s", "assigned_treatment"), outcome_cov = ~X1 +     X2 + X3 + X4 + age_s, first_period = 2, last_period = 8,     censor_at_switch = TRUE, where_var = NULL, separate_files = TRUE,     data_dir = subset_dir)
   3: eval(code, test_env)
   4: eval(code, test_env)
   5: 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)
   6: doTryCatch(return(expr), name, parentenv, handler)
   7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: 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) {    })
  13: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  14: test_that("data extensions works as expected with separate_files=TRUE",     {        data <- readRDS(test_path("data/pre_data_extension.rds"))        all_dir <- withr::local_tempdir(pattern = "all", tempdir(TRUE))        subset_dir <- withr::local_tempdir(pattern = "subset",             tempdir(TRUE))        result_limited <- data_extension(data = data, keeplist = c("id",             "trial_period", "followup_time", "outcome", "weight",             "treatment", "X1", "X2", "X3", "X4", "age_s", "assigned_treatment"),             outcome_cov = ~X1 + X2 + X3 + X4 + age_s, first_period = 2,             last_period = 8, censor_at_switch = TRUE, where_var = NULL,             separate_files = TRUE, data_dir = subset_dir)        result <- data_extension(data = data, keeplist = c("id",             "trial_period", "followup_time", "outcome", "weight",             "treatment", "X1", "X2", "X3", "X4", "age_s", "assigned_treatment"),             outcome_cov = ~X1 + X2 + X3 + X4 + age_s, censor_at_switch = TRUE,             where_var = NULL, separate_files = TRUE, data_dir = all_dir)        expect_file(result_limited$data)        expect_file(result$data)        expect_character(result$data, len = 10)        expect_character(result_limited$data, len = 7)        expect_identical(read.csv(file.path(all_dir, "trial_2.csv")),             read.csv(file.path(subset_dir, "trial_2.csv")))        expect_equal(list.files(subset_dir, full.names = TRUE),             result_limited$data)        expect_equal(list.files(all_dir, full.names = TRUE),             result$data)        result_trials <- rbindlist(c(list(result_limited$data_template),             lapply(result_limited$data, data.table::fread)))        expected_limited <- TrialEmulation:::data_extension(data = data,             keeplist = c("id", "trial_period", "followup_time",                 "outcome", "weight", "treatment", "X1", "X2",                 "X3", "X4", "age_s", "assigned_treatment"), outcome_cov = ~X1 +                 X2 + X3 + X4 + age_s, first_period = 2, last_period = 8,             censor_at_switch = TRUE, where_var = NULL, separate_files = FALSE)        data.table::setorderv(expected_limited$data, c("trial_period",             "id", "followup_time"))        expect_equal(as.data.frame(result_trials)$weight, as.data.frame(expected_limited$data)$weight)    })
  15: eval(code, test_env)
  16: eval(code, test_env)
  17: 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)
  18: doTryCatch(return(expr), name, parentenv, handler)
  19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: 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) {    })
  25: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  26: source_file(path, env = env(env), desc = desc, error_call = error_call)
  27: FUN(X[[i]], ...)
  28: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  29: doTryCatch(return(expr), name, parentenv, handler)
  30: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  31: tryCatchList(expr, classes, parentenv, handlers)
  32: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  33: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  34: 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)
  35: 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)
  36: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  37: test_check("TrialEmulation")
  An irrecoverable exception occurred. R is aborting now ...

https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2025-03-09/antaresEditObject.txt

* checking tests ...
  Running 'testthat.R'/home/th798/R/R-devel/bin/BATCH: line 60: 383415 Segmentation fault      (core dumped) ${R_HOME}/bin/R -f ${in} ${opts} ${R_BATCH_OPTIONS} > ${out} 2>&1

 ERROR
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > #Copyright © 2016 RTE Réseau de transport d’électricité
  > 
  >   # CRAN limite CPU usage
  > data.table::setDTthreads(2)
  > 
  > library(testthat)
  > library(antaresEditObject)
  Loading required package: antaresRead
  > 
  > test_check("antaresEditObject")
  
   *** caught segfault ***
  address 0x159caa410, cause 'memory not mapped'
  
  Traceback:
   1: fwrite(x = as.data.table(time_series), row.names = FALSE, col.names = FALSE,     sep = "\t", file = file.path(inputPath, cluster_type, "series",         area, lower_cluster_name, "series.txt"))
   2: .createCluster(area = area, cluster_name = cluster_name, group = group,     ..., time_series = time_series, prepro_data = NULL, prepro_modulation = NULL,     add_prefix = add_prefix, overwrite = overwrite, cluster_type = "renewables",     opts = opts)
   3: createClusterRES(area = "area51", cluster_name = "ren01", add_prefix = FALSE)
   4: eval(code, test_env)
   5: eval(code, test_env)
   6: 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)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: 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) {    })
  14: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  15: test_that("RES works", {    tmp <- tempfile()    suppressWarnings({        createStudy(path = tmp, antares_version = "8.1.0")        opts <- antaresRead::setSimulationPath(tmp)    })    activateRES(quietly = TRUE)    expect_true(is_active_RES(opts))    expect_true(file.exists(file.path(tmp, "input", "renewables")))    createArea(name = "area51")    createClusterRES(area = "area51", cluster_name = "ren01",         add_prefix = FALSE)    clusterResIni <- file.path(opts$inputPath, "renewables",         "clusters", "area51", "list.ini")    expect_true(file.exists(clusterResIni))    expect_true(file.size(clusterResIni) > 0)    clusterRes <- readIniFile(clusterResIni)    expect_true("ren01" %in% names(clusterRes))    editClusterRES(area = "area51", cluster_name = "ren01", group = "Solar Rooftop",         add_prefix = FALSE)    clusterRes <- readIniFile(clusterResIni)    expect_identical(clusterRes$ren01$group, "Solar Rooftop")    removeClusterRES(area = "area51", cluster_name = "ren01",         add_prefix = FALSE)    clusterRes <- readIniFile(clusterResIni)    expect_false("ren01" %in% names(clusterRes))    unlink(tmp, recursive = TRUE)})
  16: eval(code, test_env)
  17: eval(code, test_env)
  18: 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)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  24: tryCatchList(expr, classes, parentenv, handlers)
  25: 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) {    })
  26: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  27: source_file(path, env = env(env), desc = desc, error_call = error_call)
  28: FUN(X[[i]], ...)
  29: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  30: doTryCatch(return(expr), name, parentenv, handler)
  31: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  32: tryCatchList(expr, classes, parentenv, handlers)
  33: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  34: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  35: 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)
  36: 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)
  37: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  38: test_check("antaresEditObject")
  An irrecoverable exception occurred. R is aborting now ...
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... ERROR
Error(s) in re-building vignettes:
sh: line 1: 385961 Segmentation fault      (core dumped) '/home/th798/R/R-devel/bin/R' --vanilla --no-echo > '/tmp/th798/15880344/RtmpTPaoM4/file5de7a66186da' 2>&1 < '/tmp/th798/15880344/RtmpTPaoM4/file5de7a6d393cab'
--- re-building 'Antares_new_features_v860.Rmd' using rmarkdown

 *** caught segfault ***
address 0x136dfd790, cause 'memory not mapped'

Traceback:
 1: fwrite(x = get(name), row.names = FALSE, col.names = FALSE, sep = "\t",     file = file.path(inputPath, "st-storage", "series", tolower(area),         tolower(cluster_name), paste0(storage_value[[name]]$string,             ".txt")))
 2: createClusterST(area = "fr", cluster_name = "test_storage", storage_parameters = storage_values_default(),     PMAX_injection = ratio_values, PMAX_withdrawal = ratio_values,     inflows = inflows_data, lower_rule_curve = ratio_values,     upper_rule_curve = ratio_values, overwrite = TRUE)
 3: eval(expr, envir)
 4: eval(expr, envir)
 5: withVisible(eval(expr, envir))
 6: withCallingHandlers(code, message = function (cnd) {    watcher$capture_plot_and_output()    if (on_message$capture) {        watcher$push(cnd)    }    if (on_message$silence) {        invokeRestart("muffleMessage")    }}, warning = function (cnd) {    if (getOption("warn") >= 2 || getOption("warn") < 0) {        return()    }    watcher$capture_plot_and_output()    if (on_warning$capture) {        cnd <- sanitize_call(cnd)        watcher$push(cnd)    }    if (on_warning$silence) {        invokeRestart("muffleWarning")    }}, error = function (cnd) {    watcher$capture_plot_and_output()    cnd <- sanitize_call(cnd)    watcher$push(cnd)    switch(on_error, continue = invokeRestart("eval_continue"),         stop = invokeRestart("eval_stop"), error = invokeRestart("eval_error",             cnd))})
 7: eval(call)
 8: eval(call)
 9: with_handlers({    for (expr in tle$exprs) {        ev <- withVisible(eval(expr, envir))        watcher$capture_plot_and_output()        watcher$print_value(ev$value, ev$visible, envir)    }    TRUE}, handlers)
10: doWithOneRestart(return(expr), restart)
11: withOneRestart(expr, restarts[[1L]])
12: withRestartList(expr, restarts[-nr])
13: doWithOneRestart(return(expr), restart)
14: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
15: withRestartList(expr, restarts[-nr])
16: doWithOneRestart(return(expr), restart)
17: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
18: withRestartList(expr, restarts)
19: withRestarts(with_handlers({    for (expr in tle$exprs) {        ev <- withVisible(eval(expr, envir))        watcher$capture_plot_and_output()        watcher$print_value(ev$value, ev$visible, envir)    }    TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE,     eval_error = function(cnd) {        signalCondition(cnd)        stop(cnd)    })
20: evaluate::evaluate(...)
21: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options))
22: in_dir(input_dir(), expr)
23: in_input_dir(evaluate(code, envir = env, new_device = FALSE,     keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options)))
24: eng_r(options)
25: block_exec(params)
26: call_block(x)
27: process_group(group)
28: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e))
29: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)),     function(loc) {        setwd(wd)        write_utf8(res, output %n% stdout())        paste0("\nQuitting from lines ", loc)    }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
30: process_file(text, output)
31: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
32: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),     output_dir = getwd(), ...)
33: vweave_rmarkdown(...)
34: engine$weave(file, quiet = quiet, encoding = enc)
35: doTryCatch(return(expr), name, parentenv, handler)
36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
37: tryCatchList(expr, classes, parentenv, handlers)
38: tryCatch({    engine$weave(file, quiet = quiet, encoding = enc)    setwd(startdir)    output <- find_vignette_product(name, by = "weave", engine = engine)    if (!have.makefile && vignette_is_tex(output)) {        texi2pdf(file = output, clean = FALSE, quiet = quiet)        output <- find_vignette_product(name, by = "texi2pdf",             engine = engine)    }}, error = function(e) {    OK <<- FALSE    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",         file, conditionMessage(e)))})
39: tools:::.buildOneVignette("Antares_new_features_v860.Rmd", "/tmp/th798/15880344/R-devel/37/antaresEditObject.Rcheck/vign_test/antaresEditObject",     TRUE, FALSE, "Antares_new_features_v860", "UTF-8", "/tmp/th798/15880344/RtmpTPaoM4/file5de7a1cc7f015.rds")
An irrecoverable exception occurred. R is aborting now ...
--- re-building 'antaresEditObject.Rmd' using rmarkdown
--- finished re-building 'antaresEditObject.Rmd'

--- re-building 'api-variant-management.Rmd' using rmarkdown
--- finished re-building 'api-variant-management.Rmd'

--- re-building 'renewables-energy-sources.Rmd' using rmarkdown
--- finished re-building 'renewables-energy-sources.Rmd'

sh: line 1: 388987 Segmentation fault      (core dumped) '/home/th798/R/R-devel/bin/R' --vanilla --no-echo > '/tmp/th798/15880344/RtmpTPaoM4/file5de7a6d00a03d' 2>&1 < '/tmp/th798/15880344/RtmpTPaoM4/file5de7a6045fa81'
--- re-building 'scenario-builder.Rmd' using rmarkdown

 *** caught segfault ***
address 0x1de278040, cause 'memory not mapped'

Traceback:
 1: fwrite(x = as.data.table(time_series), row.names = FALSE, col.names = FALSE,     sep = "\t", file = file.path(inputPath, cluster_type, "series",         area, lower_cluster_name, "series.txt"))
 2: .createCluster(area = area, cluster_name = cluster_name, group = group,     ..., list_pollutants = list_pollutants, time_series = time_series,     prepro_data = prepro_data, prepro_modulation = prepro_modulation,     add_prefix = add_prefix, overwrite = overwrite, cluster_type = "thermal",     opts = opts)
 3: createCluster(area = "earth", cluster_name = "america", add_prefix = FALSE)
 4: eval(expr, envir)
 5: eval(expr, envir)
 6: withVisible(eval(expr, envir))
 7: withCallingHandlers(code, message = function (cnd) {    watcher$capture_plot_and_output()    if (on_message$capture) {        watcher$push(cnd)    }    if (on_message$silence) {        invokeRestart("muffleMessage")    }}, warning = function (cnd) {    if (getOption("warn") >= 2 || getOption("warn") < 0) {        return()    }    watcher$capture_plot_and_output()    if (on_warning$capture) {        cnd <- sanitize_call(cnd)        watcher$push(cnd)    }    if (on_warning$silence) {        invokeRestart("muffleWarning")    }}, error = function (cnd) {    watcher$capture_plot_and_output()    cnd <- sanitize_call(cnd)    watcher$push(cnd)    switch(on_error, continue = invokeRestart("eval_continue"),         stop = invokeRestart("eval_stop"), error = invokeRestart("eval_error",             cnd))})
 8: eval(call)
 9: eval(call)
10: with_handlers({    for (expr in tle$exprs) {        ev <- withVisible(eval(expr, envir))        watcher$capture_plot_and_output()        watcher$print_value(ev$value, ev$visible, envir)    }    TRUE}, handlers)
11: doWithOneRestart(return(expr), restart)
12: withOneRestart(expr, restarts[[1L]])
13: withRestartList(expr, restarts[-nr])
14: doWithOneRestart(return(expr), restart)
15: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
16: withRestartList(expr, restarts[-nr])
17: doWithOneRestart(return(expr), restart)
18: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
19: withRestartList(expr, restarts)
20: withRestarts(with_handlers({    for (expr in tle$exprs) {        ev <- withVisible(eval(expr, envir))        watcher$capture_plot_and_output()        watcher$print_value(ev$value, ev$visible, envir)    }    TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE,     eval_error = function(cnd) {        signalCondition(cnd)        stop(cnd)    })
21: evaluate::evaluate(...)
22: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options))
23: in_dir(input_dir(), expr)
24: in_input_dir(evaluate(code, envir = env, new_device = FALSE,     keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options)))
25: eng_r(options)
26: block_exec(params)
27: call_block(x)
28: process_group(group)
29: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e))
30: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)),     function(loc) {        setwd(wd)        write_utf8(res, output %n% stdout())        paste0("\nQuitting from lines ", loc)    }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
31: process_file(text, output)
32: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
33: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),     output_dir = getwd(), ...)
34: vweave_rmarkdown(...)
35: engine$weave(file, quiet = quiet, encoding = enc)
36: doTryCatch(return(expr), name, parentenv, handler)
37: tryCatchOne(expr, names, parentenv, handlers[[1L]])
38: tryCatchList(expr, classes, parentenv, handlers)
39: tryCatch({    engine$weave(file, quiet = quiet, encoding = enc)    setwd(startdir)    output <- find_vignette_product(name, by = "weave", engine = engine)    if (!have.makefile && vignette_is_tex(output)) {        texi2pdf(file = output, clean = FALSE, quiet = quiet)        output <- find_vignette_product(name, by = "texi2pdf",             engine = engine)    }}, error = function(e) {    OK <<- FALSE    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",         file, conditionMessage(e)))})
40: tools:::.buildOneVignette("scenario-builder.Rmd", "/tmp/th798/15880344/R-devel/37/antaresEditObject.Rcheck/vign_test/antaresEditObject",     TRUE, FALSE, "scenario-builder", "UTF-8", "/tmp/th798/15880344/RtmpTPaoM4/file5de7a7e8252b6.rds")
An irrecoverable exception occurred. R is aborting now ...
SUMMARY: processing the following files failed:
  'Antares_new_features_v860.Rmd' 'scenario-builder.Rmd'

Error: Vignette re-building failed.
Execution halted

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions