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

Alexander Kellett lypanov at
Sun Jan 11 19:16:16 UTC 2004

umm.. wierd subject for an email? ;-)

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. If kde ruby programs have to be started via
> krubyinit, then maybe we could have our own version of kdeinit which
> started off a 'do nothing' background process linked to
> krubyinit would need a means of telling whether
> the background daemon had already been launched.

for the actual fix one only needs a small program which
links to qt/kde and embeds a ruby interpreter. this fixes
the common case. however in order to get a nice speed 
up for ruby/kde based apps we *would* need a krubyinit
like process in the background. however for the moment
this is really not all that important imo as its just a speed
optimisation and after first start (loading smokekde for
the first time / after linking - which is very slow unfortunately
due to the size of smokekde) we are already very fast
in any case, around 1 second for my prototype of a
khtml using browser.

just noticed that germain also worked on a khtml based
browser (just checked out PerlQt-3). unfortunately PerlQt
cvs doesn't seem to compile

/home/alex/install/kde/include/qptrlist.h: In member function `void
   QPtrList<type>::deleteItem(void*) [with type = KXMLGUIClient]':
x_13.cpp:10171:   instantiated from here
/home/alex/install/kde/include/qptrlist.h:150: invalid use of undefined type `
   struct KXMLGUIClient'
/home/alex/install/kde/include/kxmlguifactory.h:30: forward declaration of `
   struct KXMLGUIClient'

i'm guessing this is due to the fact that i'm using smoke kde
from kdebindings rather than from perlqt cvs but i have no idea
how to pick the one to use :)

at the moment i'm working on a khtml based html documentation 
browser with searching functionality / automated index creation.
unfortunately i've hit across a stumbling block which has now
got me completely baffled.

richard: could you take a look at cast_object_to in Qt::Internal
and try running the example korundum/examples/kde.rb?
this example contains the currently crashing script. just export
BASEDOCURL with an interesting html file and load up kde.rb
then click the debug button. it'll crash immeditely. i'd like
to get this repeated in PerlQt to find out if its a smoke or
qtruby/kordundum bug, which i assume it is, as i really don't
understand the code that i've currently got in , somehow
the cast and then subsequent calls on the resulting VALUE
object are causing stack corruption problems later on in
the execution. removing the line accessing the text node's
string stops the crash later on in the document.

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. 

germain: have you got any CAST using examples?


p.s: the signature that sigrot chose is really on the mark
Memory fault -- brain fried

More information about the Kde-bindings mailing list