Skip to content

[Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2 messages · Henrik Singmann, John Buonagurio

#
Hi Kevin,

The easiest way for me to reproduce the issue on Linux was to upload the zip file containing the R package folder plus the .Rproj file onto my Rstudio Server. This zip file can be found here: http://singmann.org/download/teaching/r/mptmin.zip

There I opened a new R script, and entered the following lines to crash R:

require(devtools)
load_all(recompile = TRUE)
no_trigger()
trigger()

I just retried it and reliably crashed my RStudio Server.

Thanks a lot,
Henrik

Am 15.10.2014 um 23:53 schrieb Kevin Ushey:

  
    
#
Hi Henrik,

R CMD INSTALL defines the NDEBUG macro (as Writing R Extensions sec. 1.7 recommends), which disables eigen_assert. Otherwise your error is triggered here:

eigen_assert(a_lhs.cols() == a_rhs.rows()
        && "invalid matrix product"
        && "if you wanted a coeff-wise or a dot product use the respective explicit functions");

Looks like it's complaining that you're trying to transpose a scalar.

win-builder doesn't add -DNDEBUG. You can just #undef NDEBUG and it will build, but I'd leave asserts on during development to avoid any unexpected behavior.

Trimmed the rest of this message as I'm having problems with a new mail filter at work...

John