libperleditor bug (was Re: [Kde-perl] Perl-Qt Designer Plugin ?)

David Greaves david at dgreaves.com
Tue Aug 24 16:02:52 CEST 2004


Germain Garand wrote:

>Le Mercredi 18 Août 2004 05:16, Rod Butcher a écrit :
>  
>
>>Thanks Christian, I've compiled it and it's looking really good !
>>    
>>
>
>it has some ennoying bugs though, so try to grab some plugin fixes from CVS if 
>you can.
>
>$ export QTDIR=< root of your Qt install>
>$ export CVSROOT=:pserver:anonymous at cvs.perlqt.sf.net:/cvsroot/perlqt
>$ cvs co PerlQt-3/perleditor
>$ cd PerlQt-3/perleditor
>$ $QTDIR/bin/qmake -makefile perleditor.pro
>$ make
># make install
>
>Some people had troubles with it, so YMMV, but there are important fixes in 
>there.
>  
>
I wonder if you meant me :)

I have been following along and occasionally prodding at my system to no 
effect :( Then I see this thread and think "aha, an updated CVS - maybe 
that annoying bug affected me"... nope.

Is there anyone interested in this? (or just willing and able to help me 
track this down?)
Please :)

Or can someone suggest another more appropriate list (if you think it's 
a real 'designer' issue).

The setup:
I recently upgraded my debian to kde3.3.3

I then tried the commands above (installed to ~/.kde/lib...) and the 
perleditor appears and seems to work (ie perl projects appear, 
perleditor preferences are there) and this with the standard kde 3.3.3 
designer.

However I still get the segmentation fault I reported a while back.

I've tried several custom builds of qt libperleditor.so etc etc.

One thing I have done is shrink my test case - it's a lot smaller :)

###
* Start pqt-designer (standard debian kde3.3.3 one)
* select perl project from new dialogue
* accept defaults
* select menu File->new
* select perl source file
* type '#' into the editor
###

This was left as a 'font problem on my machine'.
Which it may be :)
But designer is the only program having a problem and only when 
libperleditor.so is loaded :)
I wonder if it's trying to use a font and not checking a return value?

I've looked at all the fonts in the prefs editor (especially the comment 
one) and they all seem to preview correctly.
I've also previewed every single one of the hundreds of fonts I have 
installed and they all preview fine.

here's a gdb backtrace as before:
0x40fae829 in _Xutf8DefaultDrawImageString ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
(gdb) bt
#0  0x40fae829 in _Xutf8DefaultDrawImageString ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
#1  0x40faef73 in _Xutf8DefaultDrawImageString ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
#2  0x40faf1ea in _Xutf8DefaultDrawImageString ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
#3  0x40faf52f in _Xutf8DefaultDrawImageString ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
#4  0x40faf868 in _Xutf8DefaultDrawImageString ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
#5  0x40fafe09 in destroy_fontdata ()
   from /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
#6  0x4084b461 in XCreateOC () from /usr/X11R6/lib/libX11.so.6
#7  0x4084a7f5 in XCreateFontSet () from /usr/X11R6/lib/libX11.so.6
#8  0x4020caf5 in QMapPrivate<QFont::Script, QString>::clear ()
   from /usr/lib/libqt-mt.so.3
#9  0x4020dff9 in QInputContext::setXFontSet () from /usr/lib/libqt-mt.so.3
#10 0x40228d47 in QWidget::setMicroFocusHint () from /usr/lib/libqt-mt.so.3
#11 0x4041e152 in QTextEdit::updateMicroFocusHint () from 
/usr/lib/libqt-mt.so.3
#12 0x4041eac0 in QTextEdit::insert () from /usr/lib/libqt-mt.so.3
#13 0x4041e8e7 in QTextEdit::insert () from /usr/lib/libqt-mt.so.3
#14 0x40417aa6 in QTextEdit::keyPressEvent () from /usr/lib/libqt-mt.so.3
#15 0x40b671d6 in Editor::keyPressEvent (this=0x882d8a0, e=0xbffff470)
    at editor.cpp:211
#16 0x402f36c5 in QWidget::event () from /usr/lib/libqt-mt.so.3
#17 0x4041714d in QTextEdit::event () from /usr/lib/libqt-mt.so.3

Obviously the trace isn't terribly helpful
I'm interpreting it that the font used in setXFontSet,  from 
QWidget::setMicroFocusHint is probably null.

The same kind of trace (#0 -> #11) occured last time but was triggered 
by a focus change.

I'm now trying to build the qt libraries with 'configure <blah> -debug' 
to allow me to trace into QWidget where it does setMicroFocus... (so I 
can see if anything is null)

David


More information about the Kde-perl mailing list