[Rcpp-devel] Runtime debugging tips for package/module?
Dirk Eddelbuettel
edd at debian.org
Sat Sep 15 05:05:18 CEST 2012
On 14 September 2012 at 17:55, Christian Gunning wrote:
| 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?
Not really, but I still resort to it...
Creating reproducible cases helps, and then whittling those down.
| 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
Quite possible. You get that error when you try instantiate a matrix object
with something that is not a matrix.
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list