[Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export
Dirk Eddelbuettel
edd at debian.org
Tue Sep 5 12:31:21 CEST 2017
On 5 September 2017 at 10:12, Helske, Jouni wrote:
| It looks like the issue has something to do with the cache from the previous sourceCpp calls: If inside of the segfaulting loop (with index i) I set Rcpp::sourceCpp("sde_functions1.cpp", rebuild = TRUE, cacheDir = paste0("dir", i)) everything works fine. Note that by just using cleanupCacheDir = TRUE does not help, which I though would do essentially the same thing.
sourceCpp() does this:
# cleanup the cache dir if requested
if (cleanupCacheDir)
cleanupSourceCppCache(cacheDir, context$cppSourcePath, context$buildDirectory)
I think we should try to focus on which if any files are still left behind by
cleanupSourceCppCache() and also remove them.
This ought to be fixable.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list