cast_object_to bug / PerlQt cvs compilation (Was Re: [Kde-bindings] [Bug 71316] QtRuby : Segmentation fault when loading Qt)

Alexander Kellett lypanov at kde.org
Mon Jan 12 18:26:22 UTC 2004


On Monday 12 January 2004 03:52, Germain Garand wrote:
> Le Dimanche 11 Janvier 2004 19:16, Alexander Kellett a écrit :
> > On Sunday 11 January 2004 19:42, Richard Dale wrote:
> > > This is good news that we have a fix - thanks for doing all the work
> > > getting in going in the cvs - I was worried it was going to be DOA
> > > after all the effort gone into it.
> yup, very nice hack!

thx :)

> 100% ack. It really is quite fast. Not significantly slower than launching
> *any* KDE application, anyway :-}

in many cases faster due to hellish amounts of relocs with all c++ programs...

> mmh, strange that it chokes during the Smoke compile... kalyptus is in sync
> with HEAD.

yeah. thats what i assumed. wierd. i'll look into it sometime this week
and get back to you.

> Plus the configure check should find your installed libsmokekde and skip
> the compile (did you use --prefix?).

yeah. that all appeared to work. i've no idea what went wrong.
maybe some missing changes from yourself, no idea :)

> Anyway, I'm afraid the CVS is not much in up-to-date /wrt PerlKDE.
> There is stuff I don't know how to place yet and SF is a pain when it comes
> to modifying a CVS structure.

yeah. that really sucks. it would be really a major improvement
all round to have PerlQt-3 in kde's cvs for 3.3 / 4.0.

> > anyone maybe how i can get a full debugging trace (i.e,
> > the output of gdb blah; run; s; s; ... [until program completes/crashes])
> > out of gdb? i'm clueless wrt this.
>
> usually, I simply do
> gdb perl
> (gdb) run the_script.pl
> *crash*
> (gdb) bt

at last i found out how to int 3 (breakpoint in x86 asm) with gcc/linux: 
its in Korundum.cpp, i also found this header on my system:
	/usr/include/glib-2.0/glib/gbacktrace.h
maybe i should try and get a copy of this into kdecore at some point
as its really a needed macro imo and i can't find it in either kde nor
in qt itself...

>  but valgrind is much more informative

usually yeah. but in this case it was completely useless :)

> > germain: have you got any CAST using examples?
>
> PerlQt's cast is just a Perl reblessing of the object... it does
>    sub CAST ($$) { bless $_[0], " $_[1]" }
> the leading space being an internal frobnication specific to PerlQt,
> so I really have no idea about the issue. Smoke is doing all the casting
> job.

yeah. at first i copied this, well, the artistic equivalent anyway :)
so, at first i just had Wrap_Data_Struct create a ruby variable VALUE
with the given type name. which i think is more or less a equiv to
perl's . but then. i read mapPointer in Korundum.cpp and started
messing with all sorts of wierd stuff after that point. slowly making
a mess of the code and getting no further. oh the fun :)

> $>CAST( $a, "Qt::Utf8Codec")
> $>print $a->mibEnum()."\n"
> 106

thx for the example i'll test this a bit later on!

Alex

-- 
Disclaimer: "These opinions are my own, though for a small fee they be
yours too."
		-- Dave Haynie



More information about the Kde-bindings mailing list