[Kde-bindings] QtRuby crashes

Richard Dale rdale at foton.es
Wed Nov 7 11:56:04 UTC 2007


On Wednesday 07 November 2007 11:27:42 Cyrille Berger wrote:
> On Wednesday 07 November 2007, Richard Dale wrote:
> > I've had a problem with the plasma ruby bindings in that after a while
> > virtual method or slot callbacks fail with what looks like a memory
> > corruption problem.
>
> I am investigating a similar problem with Kross + QtRuby.
>
> I have replaced in VirtualMethodCall::callMethod() , the rb_funcall2 with a
> rb_rescue2 to catch the exception (I can give you a patch if you want, but
> it's pretty messed up with a lot of debug call). And the exception I get
> is "SystemStackError: stack level too deep".
Yes that sounds useful. I was going to add rb_protect() or similar to virtual 
method and slot callbacks, once I'd understood the reason for the memory 
corruption and virtual method callbacks failing.

> So I am currently try to track the error inside ruby VM, and as far as I
> can see, at some point the length of the stack become negative, which seems
> to confirm some sort of random memory corruption.
That sounds tricky to fix. I'm not sure why it doesn't seem to occur with a 
stand alone qtruby or korundum program.

-- Richard




More information about the Kde-bindings mailing list