From: Jan Bernhardt Date: 2003-05-15T08:30:41+09:00 Subject: Re: Embedding/GC/heap corruption problem On Thu, 15 May 2003 00:53:20 +0200, Simon Strandgaard wrote: > [snip rb_game.cpp] > > I have been looking at your code for 30 minutes.. just staring.. I > cannot spot any buggy constructions. Sorry. Maybe it's not my code's fault. I'm getting the impression that Ruby might have a bug here. The messages' frequency is quite high - it may well be that over 100 messages per second hit the dispatch, maybe it's a timing problem, but I don't really think that this is very likely because of the single threaded nature of the HL engine and the Ruby interpreter. I also tried different Ruby versions (1.6.7, 1.6.8, 1.8.0preview2) - all versions resulting in the same error. Maybe someone with a deeper insight into the Ruby GC can offer some ideas here. > For others which has no overview-of/unfamiliar-with ones code then > bigger ruby-extensions is hard debuggable. Have you looked at SWIG ? > Suggestion: I think you will be able to get more help if you used SWIG. I know about swig, but I don't think it has any advantages for my purpose. The wrapping of the engine internals is very straightforward and there aren't that many natives. As I did dive that deep into swig I fear that there is the possibility of losing performance to the genericity (sp?) of swig. - Jan.