On Tue,  1 Nov 2005 at 14:45 +0000, Richard Dale wrote:
> Hans  Fugal wrote:
> 
> >> QtRuby used to callcc() to jump out of the constructor, instead of using
> >> an exception. It looks to me as though that change has somehow got messed
> >> up in the debian version.
> > 
> > Well, except I first had the problem in the original tarballs (1.0.9
> > and 1.0.10) that I had downloaded from rubyforge, and then noticed that
> > the debian package was behaving the same way and that someone had
> > opened a bug report on it. So it seems it must be the way it interacts
> > with something on a Debian system.
>
> I would be surprised if QtRuby 1.0.9 and 1.0.10 had this problem. 

Nevertheless, that's what I've been saying. The "empty-window, super
doesn't return" problem happens on Debian etch using qtruby 1.0.9. Make
no mistake about it, every bit of qtruby is what I got directly from
rubyforge. It just so happens that it is also happening with the debian
package. What's more, the very installation of qtruby 1.0.9 (from
source)that was working just fine simply stopped working when I upgraded
to etch, even though qtruby itself did not change.

So what did change? Well libqt3-mt upgraded slightly to 3.3.5 from 3.3.4
(IIRC), ruby went to 1.8.3 from 1.8.2, and (not that it sould matter,
but for completeness) automake is at verson 1.7.9.

> Is it possible to have a look at the Qt.cpp and qtruby.rb sources from the
> Debian release, and I will be able to tell what's going on? Here is what
> the code looks like that uses exceptions. Can you see what these methods
> look like in the Debian version?

Sure, you can find the source at
http://packages.debian.org/unstable/source/kdebindings

Or, you can browse it here: http://hans.fugal.net/tmp/qtruby

> From Qt.cpp:
> 
> static VALUE
> initialize_qt(int argc, VALUE * argv, VALUE self)
> {
>     ...
> 
>     free(temp_stack);
>     // Off with a longjmp, never to return..
>     rb_throw("newqt", result);
>     /*NOTREACHED*/
>     return self;
> }

Looks the same.

> From qtruby.rb:
> 
> def Internal.try_initialize(instance, *args)
>     initializer = instance.method(:initialize)
>     catch "newqt" do
>         initializer.call(*args)
>     end
> end

Yes, plus a bit about redefining inspect and pretty_print.