[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: BUG: KStaticDeleters cleaned up too soon
From:       "Gary L. Greene, Jr." <greeneg () arklinux ! org>
Date:       2004-09-15 5:30:46
Message-ID: 200409150130.48561.greeneg () arklinux ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 15 September 2004 01:00 am, richedw@vodafone.es wrote:
> I originally reported this as BUG 89333 =>KStaticDeleter crashes Kate on
> quit. This bug is crashing applications all over and it is being fixed at
> the wrong places.
> I have traced it to the ~KApplication destructor when quitting .
> KGlobal::deleteStaticDeleters() deletes the all the Static Deleters and
> next KLibLoader::cleanUp() cleans up left-overs objects, which may in their
> destructor
> try to access a static deleter that is no longer there.
> KLibLoader::cleanUp shold be called first unless there is a good reason not
> to,
> otherwise best avoid KStaticDeleter for factory singletons.
> The coding of the KStaticDeleter itself is much to blame as once created it
> sets
> a global variable and doesn't check for deletion.
>
> For instance in KateDocument destructor:
>  KateFactory::Self()->unregisterDocuments()
> this tries to access the factory held in a static deleter that's already
> gone and crashes.
> see BUG 89333 for full explanation.
>
> In KONQUEROR same thing happens...
>
> KFileMetaInfoProvider * KFileMetaInfoProvider::self()
> {
>     if ( !s_self )
>         s_self = sd.setObject( s_self, new KFileMetaInfoProvider() );
>
>     return s_self;
> }
>
> KFileMetaInfoProvider::~KFileMetaInfoProvider()
> {
>     sd.setObject( 0 );     // sd has been deleted!!!
> }
>
> you'll see similar backtraces all over the place.
>
> [New Thread 16384 (LWP 2593)]
> [KCrash handler]
> #4  0x2f656c61 in ?? ()
> #5  0x4049e17e in QDict<KFilePlugin>::deleteItem(void*) ()
>    from /usr/local/kde/lib/libkio.so.4
> #6  0x41220b4a in QGDict::clear() (this=0x83f6198) at tools/qgdict.cpp:783
> #7  0x4049cc4c in QDict<KFilePlugin>::clear() ()
>    from /usr/local/kde/lib/libkio.so.4
> #8  0x4049bbc8 in QDict<KFilePlugin>::~QDict() ()
>    from /usr/local/kde/lib/libkio.so.4
> #9  0x404971a6 in KFileMetaInfoProvider::~KFileMetaInfoProvider() ()
>    from /usr/local/kde/lib/libkio.so.4
> #10 0x4049e963 in KStaticDeleter<KFileMetaInfoProvider>::destructObject()
> () from /usr/local/kde/lib/libkio.so.4
> #11 0x40a3b69a in KGlobal::deleteStaticDeleters() () at kglobal.cpp:189
> #12 0x409a3d61 in ~KApplication (this=0xbffff4e0) at kapplication.cpp:1572
> #13 0x4006d2b4 in kdemain () from
> /usr/local/kde/lib/libkdeinit_konqueror.so #14 0x08048697 in main ()
>
> I send this to you because I saw you refer to it on the list.
> Cheers David.
>
> Richard Edwards (grizzly).
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<

Hmmm, this may well be the culprit with kaffeine_part's periodic crash when 
the container holding it closes before the media is finished playing.... Can 
anyone confirm this?

- -- 
Gary L. Greene, Jr.
Sent from uriel
 01:28:19 up 14:29,  9 users,  load average: 1.79, 1.46, 0.94
 
============================================================
Developer for the Ark Linux Project
 check out http://www.arklinux.org/ for more info.
 Also http://www.csis.gvsu.edu/~greeneg/
EMAIL : greeneg@arklinux.com
============================================================
 
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
for more information.
Consider using a free MS-Office replacement for most platforms,
http://www.openoffice.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBR9OGpYIGqyXDl5wRAi3iAJ44lBMUESILs6kw7kvQAQ9p/E7YDACghFgt
8On26NFXP/JGjdLMSXpdMLM=
=wp0A
-----END PGP SIGNATURE-----
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic