[Kde-bindings] Constructor error with QtRuby redux
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Tue Dec 6 10:23:34 UTC 2005
On Tuesday 06 December 2005 01:41, Caleb Tennis wrote:
> It seems that last month's issues with Debian are creeping over to Gentoo.
>
> Namely, any Ruby version >1.8.3 (that is, 1.8.4_pre{1,2}) exhibit the same
> issue, where no initializer code is run after a "super" call.
>
> I put in a few debugging "puts"es, but I'm not set up to fully debug the
> cpp source at the moment. however, I'm never seeing
> Internal.try_initialize get called, which is a bit bothersome. I'll
> continue investigating in the morning unless someone else gets to it.
Oh dear - I was assuming this was an issue with the way Qt was built. It looks
like this throw at the end of qt_initialize() is never caught, I don't know
why:
...
// Off with a longjmp, never to return..
rb_throw("newqt", result);
/*NOTREACHED*/
return self;
}
It should be caught here:
# Runs the initializer as far as allocating the Qt C++ instance.
# Then use a throw to jump back to here with the C++ instance
# wrapped in a new ruby variable of type T_DATA
def Internal.try_initialize(instance, *args)
initializer = instance.method(:initialize)
catch "newqt" do
initializer.call(*args)
end
end
I can't remember previous bug reports saying it only happened with very recent
versions of ruby though.
-- Richard
More information about the Kde-bindings
mailing list