KICONLOADER_CHECKS still necessary?
David Faure
faure at kde.org
Wed Sep 16 22:20:07 BST 2009
On Wednesday 16 September 2009, Boudewijn Rempt wrote:
> I was playing with Lennart Poetterings new mutrace tool and we discovered
> that the tool was hanging on the exit of every kde application. That has
> been fixed, but I was curious why. It turns out that mutrace hung on
> kbacktrace, which is called in this code:
>
> KIconLoader::~KIconLoader()
> {
> #ifdef KICONLOADER_CHECKS
> for( QList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
> it != kiconloaders->end();
> ++it )
> {
> if( (*it).loader == this )
> {
> (*it).valid = false;
> (*it).delete_bt = kBacktrace();
> break;
> }
> }
> #endif
> delete d;
> }
>
> I'm wondering whether this define is still needed. According to the
> comments, was created to detect bugs like #68528 -- but isn't a unittest
> more appropriate than executing all this overhead for everyone who closes
> a KDE application?
Guess why this code exists? Because we were never able to find a reproduceable
way to trigger #68528. This is a sentinel so that we get information in the
case where the corruption happens.
Hopefully KICONLOADER_CHECKS is only enabled in debug mode anyway?
This being said I have no idea if the bug still happens in kde4.
--
David Faure, faure at kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list