[R-pkg-devel] CRAN submission error when running tests in testthat
Gábor Csárdi
c@@rd|@g@bor @end|ng |rom gm@||@com
Thu Nov 25 12:33:01 CET 2021
On Thu, Nov 25, 2021 at 11:49 AM Ivan Krylov <krylov.r00t using gmail.com> wrote:
>
> On Wed, 24 Nov 2021 16:37:44 +0000 (UTC)
> Nathan Green via R-package-devel <r-package-devel using r-project.org> wrote:
>
> > An irrecoverable exception occurred. R is aborting now ...
>
> It seems that some of your dependencies which use compiled code
> manage to crash the R process on CRAN Mac machines. Since testthat
> normally hides most output from you and it doesn't get a chance to
> produce useful output on R process crash, it's hard to determine where
> the crash occurs, especially with testthat's backtrace being so long.
Are you sure about this? I don't think testthat hides any output. R
CMD check on the other hand AFAICT only shows the last 13 lines by
default. See the _R_CHECK_TESTS_NLINES_ environment variable in
https://cran.r-project.org/doc/manuals/r-devel/R-ints.html
> Try submitting the package to
> <https://mac.r-project.org/macbuilder/submit.html>: that should give
> you the full backtrace, at least.
This is an arm64 mac, and the package does not fail on that:
https://cran.rstudio.com/web/checks/check_results_BCEA.html
It is still worth a shot, the crash might be non-deterministic. If it
does not fail, then you can try rhub::check() and select an x86_64
macOS builder.
You can supply environment variables to set in rhub::check, so you can
set _R_CHECK_TESTS_NLINES_ to zero, or you'll also have access to the
testthat.Rout* files at the end of the check.
Considering that your package does not have any compiled code, the
crash is probably in some other package, which will make this quite
hard to fix, especially if you cannot reproduce the crash on R-hub.
FWIW I just ran it on my x86_64 mac and it did not crash.
> If the *.Rout files from the Mac builder don't pinpoint the culprit, try
> passing different reporter= arguments to test_check() and see if any of
> them result in verbose logs that show every test being run.
> Alternatively, switch some of your tests to the classic R tests, which
> produce a verbose .Rout file for every tests/*.R file [*].
I don't think that a different reporter will help if you only have the
truncated R CMD check output.
Gabor
> --
> Best regards,
> Ivan
>
> [*]
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-subdirectories
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list