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

2017-09-05 Thread Dirk Eddelbuettel
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

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

2017-09-05 Thread Dirk Eddelbuettel
On 5 September 2017 at 09:32, Helske, Jouni wrote: | Oops, forgot the link to the repo: https://github.com/helske/crashtest/issues/1 And for those reading here, Jouni and I are now down to looking after sourceCpp() repeatedly running in the same directory --- this seems to need a bit a cleanup.

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

2017-09-05 Thread Helske, Jouni
k Eddelbuettel Kopio: Rcpp-devel@lists.r-forge.r-project.org Aihe: Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export Oops, forgot the link to the repo: https://github.com/helske/crashtest/issues/1 Best, Jouni Lähettäjä: Hel

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

2017-09-05 Thread Helske, Jouni
anottaja: Helske, Jouni Kopio: Rcpp-devel@lists.r-forge.r-project.org Aihe: Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export Hi Jouni, On 4 September 2017 at 08:22, Helske, Jouni wrote: | In the bssm package (https://github.com/helske/bssm), I let the users | d

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

2017-09-05 Thread Helske, Jouni
ihe: Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export Hi Jouni, On 4 September 2017 at 08:22, Helske, Jouni wrote: | 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

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

2017-09-04 Thread Dirk Eddelbuettel
Hi Jouni, On 4 September 2017 at 08:22, Helske, Jouni wrote: | 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 wo

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

2017-09-04 Thread Helske, Jouni
d it takes seemingly random amount of iterations until Rstudio crashes. Jouni Lähettäjä: Simon Barthelmé Lähetetty: maanantai 4. syyskuuta 2017 13.14.52 Vastaanottaja: Helske, Jouni; Rcpp-devel@lists.r-forge.r-project.org Aihe: Re: [Rcpp-devel] Rstudio crashes wit

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

2017-09-04 Thread Simon Barthelmé
Hi Helske I've had this happen to me and if memory serves in my case it was due to a memory leak on the C++ side that didn't bother R too much but caused sourceCpp to crash. Maybe try valgrind? Simon On 04/09/2017 10:22, Helske, Jouni wrote: Hi, In the bssm package (https://github.com/he

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

2017-09-04 Thread Iñaki Úcar
Hi, 2017-09-04 10:22 GMT+02:00 Helske, Jouni : > 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 f

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

2017-09-04 Thread Helske, Jouni
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 function