(Resending, corrected headers) Henrik,
The list address is rcpp-de...@r-forge.wu-wien.ac.at Would you mind using that? The gmane redirector messes up automated filtering. Thank you! Moreover, it also seems to have swallowed my reply. Please do not create extra work for us. Thanks. On 15 October 2014 at 23:15, Henrik Singmann wrote: |=20 |=20 | Hi Dirk and list, |=20 | I have now managed to isolate the problem. The cpp file posted below = can on both Windows and Linux crash R if (a) compiled by winbuilder (wi= ndows only) or if build via devtools::load_all() or from within Rstudio= ("Build & Reload") and (b) when using the appropriate input. |=20 | The following input crashes R: | S <- 3 | Ineq <- structure(0, .Dim =3D c(1L, 1L)) | =20 | But this input is okay: | S <- 3 | Ineq <- structure(c(-1, 1, 0), .Dim =3D c(1L, 3L)) |=20 | =20 | The c++ function producing the problem is (where SS =3D S and ineq =3D= Ineq): |=20 | #### code follows ###### |=20 | SEXP determinant2( SEXP SS, SEXP ineq){ | BEGIN_RCPP I *strongly* recommend you look into the Rcpp Attributes vignette, and the hundreds of examples in the list archive and on, say, the Rcpp Gallery, and use an an interface such as // [[Rcpp::export]] Rcpp::NumericMatrix foo(Rcpp::NumericMatrix a, Rcpp::NumericMatrix n) { ... (and I used base Rcpp for simplicity, RcppEigen works the same way). We had several cases where manual use of RNGScope gets in the way. That may not be the use, but it makes it easier for everybody to play along --- if you use the same format we all use. Otherwise -- thanks, and I'll try to take a look later. Dirk PS Your example is not self-contained. What arguments do you supply to determinant2 ? -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel