Skip to content
Prev 2315 / 10988 Next

[Rcpp-devel] Create and access several instances of a C++ class from R

On May 18, 2011 2:53 AM, <soeren.vogel at uzh.ch> wrote:
but it may take more time to debug or find bad design. Perhaps we will be
back with more detailed questions. Anyway, one question already emerged.
When librarying the class, assigning an object, do some calculations,
whatever -- everything goes fine. Yet, when using R CMD BATCH on a file
listing the same commands as by hand, R produces some nice information at
the end, however, here it produces an segmentation fault, which does --
according to my small knowledge -- say something bad:
freed object - object was probably modified after being freed.
version = version, ascii = ascii, compress = compress, envir =
.GlobalEnv,     precheck = FALSE)
As you can see, the problem occurs when R is saving the worksheet.  At
present an instance of a Rcpp module class cannot be saved. It is likely
that this will need to be addressed by the person designing each C++ class
that will be expressed in a module.  R can't serialize the contents of
memory that it doesn't "own".

The current fix is "don't do that".  Add the --no-save or --vanilla in your
call to R CMD BATCH to suppress saving the worksheet.
00install.out:
'/Users/sovo/GUTS/FOO.Rcheck/FOO/libs/i386/FOO.so':
not found: __ZN3FOOC1Ev
we guess that this error has something to do with the Rcpp modules
implementation.
So
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110518/ce8175bb/attachment.htm>