[Rcpp-devel] Runtime debugging tips for package/module?

Christian Gunning xian at unm.edu
Sat Sep 15 02:55:16 CEST 2012


I've successfully compiled/installed a package built with
Rcpp.package.skeleton(module=T).
The C++ codebase is larger and more complex than I'm used, and I'm now
in the testing/runtime-debugging phase.
I'm wondering what "standard" runtime debugging tools are available
for errors that don't cause segfaults (so the standard "R -d gdb
--vanilla" doesn't help identify where the error occurred).

Is sprinkling code with Rf_PrintValue calls relatively efficient?
I'm a little unclear on where this error comes from -- is this an
exception thrown by Rcpp that's propagated back up to R?  Is there a
good place to learn about Rcpp's error pathways?

model <- new(Metapop, npop, initstates, transmat, poplist)
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...):
  not a matrix

thanks,
Christian


More information about the Rcpp-devel mailing list