KStaticDeleter: frequent crashed all over KDE

David Faure faure at kde.org
Mon Apr 19 01:23:40 BST 2004


On Monday 19 April 2004 00:34, Michael Brade wrote:
> Hi,
> 
> currently I'm seeing crashed like the one below when exiting Konqueror, 
> KDevelop, KNotes and more. It doesn't happen all the time though. I think it 
> started when I updated my qt-copy version, the only thing that changed was 
> the application of some more of our local Qt patches. Here's two of those 
> backtraces:
> 
> #2  <signal handler called>
> #3  0x006f0044 in ?? ()
> #4  0x40950b3f in KStaticDeleter<QPtrList<KServiceTypeProfile> 
> >::destructObject () from /opt/kde-3/lib/libkio.so.4
> #5  0x40e90765 in KGlobal::deleteStaticDeleters ()
>    from /opt/kde-3/lib/libkdecore.so.4
> #6  0x40def85c in KApplication::~KApplication ()
>    from /opt/kde-3/lib/libkdecore.so.4

Ouch, that's the KStaticDeleter I reenabled in kio/kuserprofile.cpp

Ah! Now I see what causes this.
KServiceTypeProfile::clear() deletes the object (the list) without telling
the staticdeleter.

Fixed now (yes I changed the behavior of an inline public method, but
it's only called by kservicetypefactory.cpp). A long-lasting problem
finally over (George fought with it a year ago, and I already made a
fix for crashes with this stuff ).


[ Hmm, this list could be turned into a multi-map anyway, but Qt doesn't have
one - and mentions of the STL get some people into anger it seems :)
I started writing a patch to turn it into a map where the key is a list, but
there's an (apparently unused) public member using the static var inline.... ]

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list