Re: [Rcpp-devel] NULL value passed as symbol address

2014-10-16 Thread Kamil Slowikowski
Please ignore my previous message. I solved my own problem. I defined `expected_errors()` 2 times. Once in the .cpp file and once in a .R file using `cppFunction()`. I simply forgot to delete the R file. ___ Rcpp-devel mailing list Rcpp-devel@lists.r-for

[Rcpp-devel] NULL value passed as symbol address

2014-10-16 Thread Kamil Slowikowski
Why must I call my C++ function using the `.Call()` syntax? Why can't I call it by name? Other C++ functions in my package do not have this problem. It's just this one that has the NULL symbol address. ``` > library(kamlib) Attaching package: ‘kamlib’ > expected_errors(c('')) Error in .Primi

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Henrik Singmann
Dear all, Actually John’s first advise was already spot on. Adding either "#define EIGEN_NO_DEBUG" or "#define NDEBUG" to the top of the cpp file (above anything else) already leads to the desired result: returning 0 instead of crashing R. When trying it the first time I somehow had put it belo

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Douglas Bates
On Thu, Oct 16, 2014 at 11:35 AM, Kevin Ushey wrote: > I think John's advice is spot on here. The issue is only seen when > `NDEBUG` is not defined. > > I can reproduce the crash (assertion failure) by ensuring I have > > CXXFLAGS=-UNDEBUG > > in my ~/.R/Makevars. Note that: > > 1. An asserti

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Kevin Ushey
I think John's advice is spot on here. The issue is only seen when `NDEBUG` is not defined. I can reproduce the crash (assertion failure) by ensuring I have CXXFLAGS=-UNDEBUG in my ~/.R/Makevars. Note that: 1. An assertion failure from Eigen implies you are doing something that you should n

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread John Buonagurio
Hi Henrik, You can just add #define EIGEN_NO_DEBUG to make it clear that you want to specifically disable Eigen assertions, without relying on what sets or does not set the DNDEBUG flag. It's in the Eigen documentation: http://eigen.tuxfamily.org/dox/TopicPreprocessorDirectives.html John > -

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Dirk Eddelbuettel
Hi Henrik, On 16 October 2014 at 16:39, Henrik Singmann wrote: | Hi Dirk, | | I am sorry to address this again, as I am in no position to argue, but the problem is still the following: I understand your frustration, but please consider: | The code runs perfectly as your example showed but wil

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Henrik Singmann
Hi Dirk, I am sorry to address this again, as I am in no position to argue, but the problem is still the following: The code runs perfectly as your example showed but will fail when using either devtools or winbuilder or CRAN when *inside a package*. The problem of producing a minimally reprod

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Dirk Eddelbuettel
On 16 October 2014 at 08:35, Dirk Eddelbuettel wrote: | | | On 16 October 2014 at 15:07, Henrik Singmann wrote: | | Hi Dirk and Kevin, | | | | I have now rebuild the package using the code Dirk send me (i.e., using attributes) and the code still reliably crashes my R on Linux when using devto

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Dirk Eddelbuettel
On 16 October 2014 at 15:07, Henrik Singmann wrote: | Hi Dirk and Kevin, | | I have now rebuild the package using the code Dirk send me (i.e., using attributes) and the code still reliably crashes my R on Linux when using devtools (independent of RStudio), but not when installing via install.

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread Henrik Singmann
Hi Dirk and Kevin, I have now rebuild the package using the code Dirk send me (i.e., using attributes) and the code still reliably crashes my R on Linux when using devtools (independent of RStudio), but not when installing via install.packages. When just using the code Dirk had send directly (