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

Henrik Singmann henrik.singmann at psychologie.uni-freiburg.de
Wed Oct 15 21:30:26 CEST 2014



Hi Dirk,

I will try to produce a minimal reproducible example, but as I need to resort on winbuilder to crash it, this could take some time. Furthermore, not all inputs crash R, as shown in the example in the end.

However, I am not sure how I contributed to the error since the C++ part of the package did run without problems for quite a while, the error only occurs with the binary from CRAN, and not all inputs show the error.
Also, the code below did run with previous versions completely, but now the last part again crashes it on windows.

An interesting additional observation could be that right now, compiling the package on windows using devtools::load_all() also produces the same error while installing the tar.gz of the same code from source does not trigger the error. Installing using devtools on windows also was never a problem for me.

Very mysterious.

Cheers,
Henrik

### new example code ###
require(MPTinR)
data(d.broeder)
m.2htm <- system.file("extdata", "5points.2htm.model", package = "MPTinR")
i.2htm <- system.file("extdata", "broeder.2htm.ineq", package = "MPTinR")

get.mpt.fia(d.broeder, m.2htm, i.2htm, Sample = 100) # works

get.mpt.fia(d.broeder, m.2htm, Sample = 100)  # crashes

### new example ends ###


Am 15.10.2014 um 21:13 schrieb Dirk Eddelbuettel:
>
> Hi Henrik,
>
> On 15 October 2014 at 20:59, Henrik Singmann wrote:
> | Dear list,
> |
> | I have the following weird problem and would be really glad for any input:
> |
> | The windows binary from CRAN for my package MPTinR, which uses RcppEigen, leads to an "Assertion failed" error which crashes R with a simple example given below (which unfortunately is not part of the examples and henceforth not tested by CRAN).
> |
> | Interestingly enough, the problem disappears when installing the package on Windows from source or when using Linux (Ubuntu). But it also appears when using a binary version of MPTinR from winbuilder (temporarily available here: http://win-builder.r-project.org/h18PJ7B55VAq), R-devel and corresponding binary from CRAN, and I could replicate the error on a range of different Windows machines. The error also always disappears when installing from source. I am also extremely confident that this problem didn't exist in the past, I and others have used this functionality regularly with the CRAN windows binary.
> |
> | ###### code starts #######
> | require(MPTinR)
> | data(d.broeder)
> | m.2htm <- system.file("extdata", "5points.2htm.model", package = "MPTinR")
> | get.mpt.fia(d.broeder, m.2htm)
> | ###### code ends #######
> |
> | The complete error message is:
> |
> | ###### error message starts #######
> | Assertion failed!
> |
> | Program: C:\Program Files\RStudio\bin\x64\rsession.exe
> | File: d:/RCompile/CRANpkg/lib/3.1/RcppEigen/include/Eigen/src/Core/ProductBase.h, Line 95
> |
> | Expression: a_lhs.cols() == a_rhs.rows() && "invalid matrix product" && "if you wanted a coeff-wise or a dot product use the respective explicit functions"
> |
> | This application has requested the Runtime to terminate it in an unusual way.
> | Please contact the application's support team for more information.
> | ###### error message ends #######
> |
> | When adding such an example to the code and resubmitting it to winbuilder it now also crashes, see http://win-builder.r-project.org/0ei38q0t48h2/00check.log
> | But again, when installing the same package on my machine from source it works.
>
> It would help us if you could create a minimally reproducible example exhibit
> this behaviour.
>
> About 24 CRAN packages use RcppEigen.  The error could be yours, or ours. But
> given the information provided so far it is hard to say more.
>
> You could also try R along with valgrind on Linux to see if that tickles it.
>
> Dirk
>
>
> | Best,
> | Henrik
> |
> | PS: A session info (without attaching MPTinR) is given below:
> |
> | R version 3.1.1 (2014-07-10)
> | Platform: x86_64-w64-mingw32/x64 (64-bit)
> |
> | locale:
> | [1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252
> | [4] LC_NUMERIC=C                        LC_TIME=German_Switzerland.1252
> |
> | attached base packages:
> | [1] stats     graphics  grDevices utils     datasets  methods   base
> |
> | other attached packages:
> | [1] devtools_1.6
> |
> | loaded via a namespace (and not attached):
> | [1] fortunes_1.5-2 tools_3.1.1
> |
> |
> |
> | --
> | Dr. Henrik Singmann
> | Universität Zürich, Schweiz
> | http://singmann.org
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel-Z+qqJ2/841dDXCDGMXqaGq2UG9VpUWMKQH7oEaQurus at public.gmane.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>

-- 
Dr. Henrik Singmann
Universität Zürich, Schweiz
http://singmann.org



More information about the Rcpp-devel mailing list