[Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export

Helske, Jouni jouni.helske at jyu.fi
Mon Sep 4 10:22:04 CEST 2017


Hi,


In the bssm package (https://github.com/helske/bssm), I let the users define a state space model via own C++ functions which are then exported as Xptr to R side, and passed back to C++ function for SMC/MCMC etc. Normally this works fine, but when user repeatedly modifies the model functions and re-exports them via repeated calls sourceCpp, sometimes whole Rstudio crashes. I haven't been able to pinpoint the reason or minimal example. Have anyone else experienced similar issues or is it just me i.e. error in my own implementations?


Simplest case of this is the discretized SDE models, this is the function which user modifies: https://github.com/helske/bssm/blob/master/vignettes/sde_functions.cpp,  <https://github.com/helske/bssm/blob/master/vignettes/sde_functions.cpp> and the relevant parts of the package codes are in src/function_pointers.h, src/sde_ssm.cpp and src/R_sde.cpp (I don't really expect anyone to read through all of these).


Best,


Jouni Helske

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20170904/e9570630/attachment.html>


More information about the Rcpp-devel mailing list