Skip to content
Prev 34093 / 63424 Next

Return a list from a .Call but segfaults

After some examination, this is what i found (i changed the code
somewhat, i dont modify rawdata anymore)

load("/tmp/v.Rdata")
dyn.load("/ln/meraki/custom/lib64/R/library/mylib/libs/lib.so")
v=.Call("returnListOfKV",rawkv,numread)

## v is a list of 28231 lists each of length 2
j=v[1:10000] ; u=list();u=append(u,j)
and
 j=v[1:15164] ; u=list();u=append(u,j)
both work but for n> 15164
 j=v[1:n] ; u=list();u=append(u,j)
returns
Error: protect(): protection stack overflow

I have no idea why...
Regards
Saptarshi




On Sat, Sep 19, 2009 at 10:15 PM, Saptarshi Guha
<saptarshi.guha at gmail.com> wrote: