KDE malloc SIGSEGV with PerlQt bindings + KDE themes

Germain Garand germain at ebooksfrance.com
Tue Nov 19 16:39:24 GMT 2002


Le Mardi 19 Novembre 2002 14:40, Karol Szwed a écrit :
> On Tuesday 19 November 2002 13:27, Germain Garand wrote:
> > Hi,
> > I'm investigating a segfault that happens when using some KDE themes
> > (namely : riscos, marble, system, systemalt).
> > It happens consistently when KDE's malloc attempts to free
> > KStandardDirs::addKDEDefaults's QStringList.
> >
> > Would someone have a hint about what is going wrong ?
>
> If the apps segfault on exit, it is most likely kthemestyle's linking to
> kdecore that is causing the problem (KStaticDeleter again most
> likely). You should not have any problems with all other style plugins
> that do not link to kdecore.
>
> If you grep for "__GLIBC__" in kthemestyle.cpp you'll see a workaround:
>
> dlopen("kthemestyle.so",RTLD_LAZY);
>
> This helps to ensure that apps don't crash on exit by preventing
> the "dlclose" in Qt from having any effect on the plugin. This prevents
> the plugin from being unloaded and avoids the segfault. This is probably
> why valgrind is giving the all clear. Are you using libc on FreeBSD by
> any chance in which case this workaround isn't enabled?
>

No, it does not segfault on exit but in the keys() request of 
KThemeStylePlugin.

kthemestyle.cpp:144         KStyleDirs::dirs()->addToSearch( "config", cfg );

Just to make it clear : I'm not talking about precompiled apps but about the 
PerlQt bindings, accessing Qt through the /kdebindings/smoke library

I'm running Linux 2.4.18 (MDK-8.2) on an i586, gcc-2.96, KDE CVS and qt-copy.
It has been known to happen also on a Suse-8.0, KDE-3.0.0, qt-3.0.3 on 
Athlon-XP 1800 and on i586/MDK 9.0

I'll CC to Adam Treat - to know if he ever experienced similar problems with 
the Qt-C# bindings...

Who ever would be interested in reproducing it would need to check out PerlQt 
and try one of the examples with one of the incriminated KDE Themes :

export CVSROOT=:pserver:anonymous at cvs.perlqt.sourceforge.net:/cvsroot/perlqt
cvs co PerlQt-3
make -f Makefile.cvs 
./configure
etc..

if kdebindings are installed, compilation is short, otherwise it takes quite 
some time...
Examples are in PerlQt-3/PerlQt/examples within the CVS tree

Germain

> Please give more info on your platform and exactly how to reproduce
> the crash if its not on exit.
>
> -- Karol





More information about the kde-core-devel mailing list