<div dir="ltr"><span style="font-size:12.8px">Hello,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I am having trouble debugging a package that appears to work fine on Mac operating systems but crashes on Unix and Windows.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have found the following example that crashes on my Windows setup (session info copied below)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>IntegerVector runif_int2() {</div><div>  return wrap(floor(runif(1000000)));</div><div>}</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">When this is called about 5-10 times in succession R crashes (e.g. with set.seed(1), but this doesn't seem to matter).</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Any ideas about why this crashes would be much appreciated. To be clear, I am not looking for an alternative to the above code (which simply produces a vector of zeroes), but would like to know what aspects of this cause a crash so I know what code structures may be causing problems in the package I am creating. The code does not appear to crash on Mac and I have yet to try it on Unix.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Many thanks in advance,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Rajen</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Session info:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>R version 3.3.1 (2016-06-21)</div><div>Platform: x86_64-w64-mingw32/x64 (64-bit)</div><div>Running under: Windows >= 8 x64 (build 9200)</div><div><br></div><div>locale:</div><div>[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252</div><div>[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    </div><div><br></div><div>attached base packages:</div><div>[1] stats     graphics  grDevices utils     datasets  methods   base     </div><div><br></div><div>loaded via a namespace (and not attached):</div><div>[1] tools_3.3.1</div></div></div>