I’m using macOS Sierra (10.12.6) on a Macbook Pro. RStudio Version 1.1.423. I just installed rcpp and rstan from source. xtools has been updated today as well.
I am repeatedly getting a segfault (output below) but only when I run my Rnw (knitr) file. When I run the code chunk by chunk, it all works fine. If I run the stan model separately from the Rnw file and just try to save the fitted model and then load it into the Rnw file using load (i.e., I try to avoid fitting the model at all within the Rnw), I still get the same segfault. Weirdly, if I now move all my code into an Rmd file and run that file (with all the stan models in it), it works fine!
Here is the segfault message:
*** caught segfault ***
address 0x1126e4198, cause ‘memory not mapped’
1: .Call(list(name = “CppObject__finalize”, address = <pointer: 0x7f951081f7b0>, dll = list(name = “Rcpp”, path = “/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/libs/Rcpp.so”, dynamicLookup = TRUE, handle = <pointer: 0x7f9510831fb0>, info = <pointer: 0x1067ee1e0>), numParameters = 2L), <pointer: 0x7f950de12360>, .pointer)
3: (function (x) x$.self$finalize())()
An irrecoverable exception occurred. R is aborting now …