I guess this may be a general question on debug. I created function using Rcpp. The compiler did not spot any error, so I can use the function. However, when running the function, with around 1/100 probability, the R just stops and closes itself without any details. I am doing simulation so the input data could be different for each time. So I am guessing may be there is some special situation that will give error. My question is do we have any way to know what line cause such error?
So far what I am using is to using comment out some components to see which part create such error. It is OK so far as long as I can replicate the error. But It is not working this time (I cannot replicate the error, may be it is too specific.) Any comments or suggestions are highly appreciated.