[Kde-bindings] QtRuby crashes
Cyrille Berger
cberger at cberger.net
Wed Nov 7 12:57:37 UTC 2007
On Wednesday 07 November 2007, Richard Dale wrote:
> On Wednesday 07 November 2007 11:27:42 Cyrille Berger wrote:
> > 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.
>
The weirdest things is if I use a ruby event loop the problem seems to
disappear, I have added this at the end of the first script I execute:
$running = true
while($running)
Qt::Application.instance().processEvents(Qt::EventLoop::AllEvents |
Qt::EventLoop::WaitForMoreEvents | Qt::EventLoop::DeferredDeletion)
end
Then I can execute other scripts, creating other objects inheriting either
Qt::Object or Qt::Widget with slots and virtual functions.
And once I call a script with $running = false; this obviously quit my "ruby"
event loop and it triggers the exception. And I see in my debug output that,
indeed, the length of the ruby stack has become negative.
--
Cyrille Berger
More information about the Kde-bindings
mailing list