From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-05-15T06:47:46+09:00 Subject: Re: Embedding/GC/heap corruption problem On Thu, 15 May 2003 00:19:23 +0200, Jan Bernhardt wrote: > On Wed, 14 May 2003 23:27:39 +0200, Simon Strandgaard wrote: >> you don't wrap rb_funcall() within a rb_protect().. >> Im guessing this is part of the reason. > > I used to do that, but during experimentation I removed the protection > wrapper. But of course you're right - I should protect the function call. OK. Maybe the 'message' variable hasn't been GC registered correct. Try swap the line containing rb_global_variable() with the line containing rb_eval_string("Message.new"); void messages_init() { message = rb_eval_string("Message.new"); rb_gc_register_address(&message); args = rb_iv_get(message, "@args"); message_registry = rb_eval_string("MessageRegistry.instance"); } -- Simon Strandgaard