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

Dieter Menne dieter.menne at menne-biomed.de
Fri Nov 30 15:57:30 CET 2012


-- Under Windows, your "try" variant works ok. 
-- Re: your comment on RStudio: RGui crashes also with the non-protected
variant
-- All versions well under Ubuntu

> -----Original Message-----
> From: Dirk Eddelbuettel [mailto:edd at debian.org]
> Sent: Friday, November 30, 2012 1:22 PM
> To: Dieter Menne
> Cc: rcpp-devel at lists.r-forge.r-project.org
> Subject: Re: [Rcpp-devel] Rcpp::stop crashes RGui and RStudio under
> Windows
> 
> 
> On 30 November 2012 at 08:44, Dieter Menne wrote:
> | 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 }
> 
> A throw, and as I recall what was added recently as 'stop()' is a
> variant, MUST gave a try/catch around it.




More information about the Rcpp-devel mailing list