Jano Svitok wrote: > > The important thing is to have matching Ruby compiler and > extension/embedding program compiler. We have that now. I did some more debugging and now know what causes the problem, but don't understand what goes wrong. If I make the script: -------------- # calls a function wrapped by SWIG returning a singleton theInterface = Fcstest::GetInterface () -------------- And run it a few times I get the eval error. But if I change it to: -------------- import GC # calls a function wrapped by SWIG returning a singleton theInterface = Fcstest::GetInterface () theInterface = nil GC.start() -------------- All is ok in the second script. In the first script, theInterface is garbage collected when the script runs for the second time, and that causes the problem. But I do not understand why... SWIG just wraps my singleton in a SWIG_NewPointerObj it does not delete or new it. -- Posted via http://www.ruby-forum.com/.