[Rcpp-devel] Rcpp::stop crashes RGui and RStudio under Windows

Dieter Menne dieter.menne at menne-biomed.de
Fri Nov 30 08:44:19 CET 2012


I tried the following under Windows 7, 64 bit, both RGui and RStudio

File "throw.cpp"

#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
int throwCpp(int nb) {
  if (nb == 10) 
    Rcpp::stop("Unexpected condition occurred");
  return nb*2; // Just for testing the normal case }


# R File
library(Rcpp)
sessionInfo()
sourceCpp("throw.cpp")
throwCpp(20) # works, just to test the setup
throwCpp(10)


When Rcpp::stop is hit, RGui and RStudio both crash. It's a really hard-hard
crash, even killing the job is not possible, I have to restart Windows to
get rid of the job.

Dieter

(apologies if this should be a repost, since I could not see it on the
nabble-list after two days, I assumed there was something wrong with my
first post).


R version 2.15.2 (2012-10-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rcpp_0.10.1






More information about the Rcpp-devel mailing list