[Rd] segfault in embedded r after call to repldlldo1
Carl Martin Grewe
grewe at zib.de
Fri Aug 20 18:14:52 CEST 2010
Dear R developers,
i've got a question concerning an embedded R instance. I called the
initialization routines as seen in the "writing extensions" guide
(Rf_initialize, setup_Rmainloop and R_ReplDLLinit). I also changed the
function callback pointer of readconsole and writeconsoleex to my local
functions.
when i call mainloop there is no problem and the commands are evaluated
as expected. because i don't want R to run in an own thread and my app
should keep the control i want to use repldlldo1. within the readconsole
as long as i copy commandlines containing valid R commands function to
R's buffer all things are fine. but when i copy a non valid command, R
singals segfault after passing the error message, that the given object
is not valid. this happens in call to eval(R_CurrentExpr, rho) in
repldlldo1. i tried to comapare both ways (mainloop vs.
repldlldo+repldllinit) but actually cannot find a significant difference.
can anyone please help me with this problem, i'm stucked with this
because i don't know the inside of R and the datastructures.
some additional information:
c++, runtime loaded libR, 64-bit linux, 2.11.1 release (but also happens
with 2.10.1)
look farward to hearing from you.
thanks,
martin
More information about the R-devel
mailing list