One thing that may help with debugging (and seeing if you get the same
error on windows) is to run your code with
R> gctorture(TRUE)
R> your.function()
That way everything is garbage collected all the time so to speak and
this may trigger an error on your windows machine.
I agree with O
Katie,
99% it's a bug in your C code caused by accessing memory (probably
writing to) which was not allocated or freed already or out of boundary.
The fact that it worked fine on Windows is likely to be a pure
coincidence of different compiler/optimisation settings. However, the
main problem