I have a package, https://github.com/tfrostig/RSEE, which includes a few (3) RcppArmadillo functions. The package works well on other computer. When I build the package no errors appear, but whenever I call any of the RCPP functions it causes R to crash.
When I try to use my Unit Testing, I obtain the error: "Exited with status -1073741819" .
If I use Rcpp::sourceCpp()
and then call the functions, everything works well. Other packages with Rcpp functions work well.
For example:
`// [[Rcpp::depends(RcppArmadillo)]]
#include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
// [[Rcpp::export]]
arma::mat localRegression(arma::mat weightmat, arma::mat modelmat, arma::vec xtemp) {
return inv(modelmat.t() * weightmat * modelmat) * modelmat.t() * weightmat * xtemp;
}
Using RSEE:::localRegression
will cause it to crash. If I load the source code using sourceCpp
and then call localRegression
it works ok.
What can cause this type of problem?
The session info is:
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_Israel.1252 LC_CTYPE=English_Israel.1252 LC_MONETARY=English_Israel.1252
[4] LC_NUMERIC=C LC_TIME=English_Israel.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RSEE_0.1.0
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3 Rcpp_1.0.6