Running 'testthat.R' [11s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(metabodecon)
  > 
  > test_check("metabodecon")
  Starting 2 test processes.
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.15 Starting deconvolution of 1 spectrum using 1 worker
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.15 Starting deconvolution of sap_01
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.15 Removing water signal
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.15 Removing negative signals
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Smoothing signals
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Starting peak selection
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Detected 24 peaks
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Detected 24 peaks
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Removing peaks with low scores
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Removed 20 peaks
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.16 Initializing Lorentz curves
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.17 MSE at peak tiplet positions: 0.0000023352180995647374
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.17 Refining Lorentz Curves
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.17 MSE at peak tiplet positions: 0.0000000822818617368644
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.18 MSE at peak tiplet positions: 0.0000000163050712082374
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.18 MSE at peak tiplet positions: 0.0000000069366441759494
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.18 Formatting return object as decon1
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.19 Finished deconvolution of sap_01
  > test-generate_lorentz_curves.R: 2026-08-07 15:56:45.19 Finished deconvolution of 1 spectrum in 0.038 secs
  > test-as_decon.R: 2026-08-07 15:56:48.18 Starting deconvolution of sap_01
  > test-as_decon.R: 2026-08-07 15:56:48.18 Removing water signal
  > test-as_decon.R: 2026-08-07 15:56:48.18 Removing negative signals
  > test-as_decon.R: 2026-08-07 15:56:48.19
  > test-as_decon.R:  Smoothing signals
  > test-as_decon.R: 2026-08-07 15:56:48.19 Starting peak selection
  > test-as_decon.R: 2026-08-07 15:56:48.19 Detected 18 peaks
  > test-as_decon.R: 2026-08-07 15:56:48.19 Detected 18 peaks
  > test-as_decon.R: 2026-08-07 15:56:48.19 Removing peaks with low scores
  > test-as_decon.R: 2026-08-07 15:56:48.19 Removed 14 peaks
  > test-as_decon.R: 2026-08-07 15:56:48.19 Initializing Lorentz curves
  > test-as_decon.R: 2026-08-07 15:56:48.19 MSE at peak tiplet positions: 0.0000024963648931653179
  > test-as_decon.R: 2026-08-07 15:56:48.19 Refining Lorentz Curves
  > test-as_decon.R: 2026-08-07 15:56:48.19 MSE at peak tiplet positions: 0.0000001165616696457351
  > test-as_decon.R: 2026-08-07 15:56:48.20 MSE at peak tiplet positions: 0.0000000180892220732885
  > test-as_decon.R: 2026-08-07 15:56:48.20 MSE at peak tiplet positions: 0.0000000055685735596689
  > test-as_decon.R: 2026-08-07 15:56:48.20 Formatting return object as idecon
  > test-as_decon.R: 2026-08-07 15:56:48.20 Finished deconvolution of sap_01
  > test-as_decon.R: 2026-08-07 15:56:48.20 Starting deconvolution of sap_01 using Rust backend
  > test-deconvolute.R: 2026-08-07 15:56:48.90 Starting deconvolution of 1 spectrum using 1 worker
  > test-deconvolute.R: 2026-08-07 15:56:48.90 Starting deconvolution of sap_01
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Removing water signal
  > test-deconvolute.R: 2026-08-07 15:56:48.91
  > test-deconvolute.R:  Removing negative signals
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Smoothing signals
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Starting peak selection
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Detected 24 peaks
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Detected 24 peaks
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Removing peaks with low scores
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Removed 20 peaks
  > test-deconvolute.R: 2026-08-07 15:56:48.91 Initializing Lorentz curves
  > test-deconvolute.R: 2026-08-07 15:56:48.92 MSE at peak tiplet positions: 0.0000023352180995647374
  > test-deconvolute.R: 2026-08-07 15:56:48.92 Refining Lorentz Curves
  > test-deconvolute.R: 2026-08-07 15:56:48.92 MSE at peak tiplet positions: 0.0000000822818617368644
  > test-deconvolute.R: 2026-08-07 15:56:48.93 MSE at peak tiplet positions: 0.0000000163050712082374
  > test-deconvolute.R: 2026-08-07 15:56:48.93 MSE at peak tiplet positions: 0.0000000069366441759494
  > test-deconvolute.R: 2026-08-07 15:56:48.94 Formatting return object as decon2
  > test-deconvolute.R: 2026-08-07 15:56:48.94 Finished deconvolution of sap_01
  > test-deconvolute.R: 2026-08-07 15:56:48.94 Finished deconvolution of 1 spectrum in 0.034 secs
  > test-deconvolute.R: 2026-08-07 15:56:48.97 Starting deconvolution of 2 spectra using 1 worker
  > test-deconvolute.R: 2026-08-07 15:56:48.97 Starting deconvolution of sim_01
  > test-deconvolute.R: 2026-08-07 15:56:48.97 Removing water signal
  > test-deconvolute.R: 2026-08-07 15:56:48.97 Removing negative signals
  > test-deconvolute.R: 2026-08-07 15:56:48.97 Smoothing signals
  > test-deconvolute.R: 2026-08-07 15:56:48.98 Starting peak selection
  > test-deconvolute.R: 2026-08-07 15:56:48.98 Detected 314 peaks
  > test-deconvolute.R: 2026-08-07 15:56:48.98 Detected 314 peaks
  > test-deconvolute.R: 2026-08-07 15:56:48.98 Removing peaks with low scores
  > test-deconvolute.R: 2026-08-07 15:56:48.98 Removed 287 peaks
  > test-deconvolute.R: 2026-08-07 15:56:48.98 Initializing Lorentz curves
  > test-deconvolute.R: 2026-08-07 15:56:48.98 MSE at peak tiplet positions: 4.0838805770844048836921
  > test-deconvolute.R: 2026-08-07 15:56:48.99 Refining Lorentz Curves
  > test-deconvolute.R: 2026-08-07 15:56:48.99 MSE at peak tiplet positions: 0.1609359876216345797140
  > test-deconvolute.R: 2026-08-07 15:56:48.99 MSE at peak tiplet positions: 0.0228015051613790278862
  > test-deconvolute.R: 2026-08-07 15:56:48.99 MSE at peak tiplet positions: 0.0071638016610617982066
  > test-deconvolute.R: 2026-08-07 15:56:48.99 Formatting return object as decon2
  > test-deconvolute.R: 2026-08-07 15:56:49.00 Finished deconvolution of sim_01
  > test-deconvolute.R: 2026-08-07 15:56:49.00 Starting deconvolution of sim_02
  > test-deconvolute.R: 2026-08-07 15:56:49.01 Removing water signal
  > test-deconvolute.R: 2026-08-07 15:56:49.01 Removing negative signals
  > test-deconvolute.R: 2026-08-07 15:56:49.01 Smoothing signals
  > test-deconvolute.R: 2026-08-07 15:56:49.02 Starting peak selection
  > test-deconvolute.R: 2026-08-07 15:56:49.02 Detected 316 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.02 Detected 316 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.02 Removing peaks with low scores
  > test-deconvolute.R: 2026-08-07 15:56:49.02 Removed 286 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.02 Initializing Lorentz curves
  > test-deconvolute.R: 2026-08-07 15:56:49.02 MSE at peak tiplet positions: 3.8338943428876719465848
  > test-deconvolute.R: 2026-08-07 15:56:49.03 Refining Lorentz Curves
  > test-deconvolute.R: 2026-08-07 15:56:49.03 MSE at peak tiplet positions: 0.1289481941626757499630
  > test-deconvolute.R: 2026-08-07 15:56:49.04 MSE at peak tiplet positions: 0.0135651899090413925741
  > test-deconvolute.R: 2026-08-07 15:56:49.04 MSE at peak tiplet positions: 0.0025556755331531126781
  > test-deconvolute.R: 2026-08-07 15:56:49.04 Formatting return object as decon2
  > test-deconvolute.R: 2026-08-07 15:56:49.05 Finished deconvolution of sim_02
  > test-deconvolute.R: 2026-08-07 15:56:49.05 Finished deconvolution of 2 spectra in 0.08 secs
  > test-deconvolute.R: 2026-08-07 15:56:49.12 Starting deconvolution of 1 spectrum using 1 worker
  > test-deconvolute.R: 2026-08-07 15:56:49.12 Starting deconvolution of sim_00
  > test-deconvolute.R: 2026-08-07 15:56:49.12 Removing water signal
  > test-deconvolute.R: 2026-08-07 15:56:49.12 Removing negative signals
  > test-deconvolute.R: 2026-08-07 15:56:49.12 Smoothing signals
  > test-deconvolute.R: 2026-08-07 15:56:49.13 Starting peak selection
  > test-deconvolute.R: 2026-08-07 15:56:49.13 Detected 63 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.13 Detected 63 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.13 Removing peaks with low scores
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Starting deconvolution of 1 spectrum using 1 worker
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Starting deconvolution of sim_00
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Removing water signal
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Removing negative signals
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Smoothing signals
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Starting peak selection
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Detected 63 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Detected 63 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Removing peaks with low scores
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Not enough signals found in signal free region. This is a clear indication that the deconvolution parameters are not set correctly. Continuing anyways without dynamic peak filtering, because `force` is TRUE. Note that this might increase runtime drastically.
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Removed 0 peaks
  > test-deconvolute.R: 2026-08-07 15:56:49.15 Initializing Lorentz curves
  > test-deconvolute.R: 2026-08-07 15:56:49.16 MSE at peak tiplet positions: 1.2776621160691832290723
  > test-deconvolute.R: 2026-08-07 15:56:49.16 Refining Lorentz Curves
  > test-deconvolute.R: 2026-08-07 15:56:49.16 MSE at peak tiplet positions: 0.0382680161940291765910
  > test-deconvolute.R: 2026-08-07 15:56:49.17 MSE at peak tiplet positions: 0.0106273721357572573792
  > test-deconvolute.R: 2026-08-07 15:56:49.18 MSE at peak tiplet positions: 0.0050118558740663400955
  > test-deconvolute.R: 2026-08-07 15:56:49.18 Formatting return object as decon2
  > test-deconvolute.R: 2026-08-07 15:56:49.18 Finished deconvolution of sim_00
  > test-deconvolute.R: 2026-08-07 15:56:49.19 Finished deconvolution of 1 spectrum in 0.039 secs
  > test-draw_spectrum.R: 
  
  Error:
  ! testthat subprocess exited in file 'test-draw_spectrum.R'.
  Caused by error:
  ! R session crashed with exit code -1073741819
  Backtrace:
       ▆
    1. └─testthat::test_check("metabodecon")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_parallel(...)
    5.         ├─withr::with_dir(...)
    6.         │ └─base::force(code)
    7.         ├─testthat::with_reporter(...)
    8.         │ └─base::tryCatch(...)
    9.         │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10.         │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11.         │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12.         └─testthat:::parallel_event_loop_chunky(queue, reporters, ".")
   13.           └─queue$poll(Inf)
   14.             └─base::lapply(...)
   15.               └─testthat (local) FUN(X[[i]], ...)
   16.                 └─private$handle_error(msg, i)
   17.                   └─cli::cli_abort(...)
   18.                     └─rlang::abort(...)
  Execution halted