kiconloader's other api change

Matthias Kretz kretz at kde.org
Tue Jan 9 17:13:15 GMT 2007


On Tuesday 09 January 2007 09:03, Thiago Macieira wrote:
> Note that qAddPostRoutine is run at ~QCoreApplication, so there is no
> QApplication or KApplication anymore by the time they are run. Do not
> call any such routines from the callbacks.

Found a case where KInstance is needed and since KApplication is the KInstance 
it's gone when the post routine is run.

Another strategy: If there is a KApplication object clean up KDE's static 
objects in ~KApplication. If there's none clean up in the postRoutine. And if 
lib unload comes first clean up from there. Ugh...

#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb68ce770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb68cfef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb73d58be in qt_message_output (msgType=QtFatalMsg,
    buf=0xbf94b470 "Fatal error: you need to have a KInstance object 
before\nyou do anything that requires it! Examples of this are 
config\nobjects, standard directories or translations.") 
at /media/hda7/KDE/src/qt-copy/src/corelib/global/qglobal.cpp:2011
#4  0xb73d593a in qFatal (
    msg=0xb765faac "Fatal error: you need to have a KInstance object 
before\nyou do anything that requires it! Examples of this are 
config\nobjects, standard directories or translations.") 
at /media/hda7/KDE/src/qt-copy/src/corelib/global/qglobal.cpp:2227
#5  0xb759c38e in KGlobal::instance () 
at /home/mkretz/KDE/src/kdelibs/kdecore/kernel/kglobal.cpp:77
#6  0xb75a5f22 in KTemporaryFile (this=0xbf94d674) 
at /home/mkretz/KDE/src/kdelibs/kdecore/io/ktemporaryfile.cpp:33
#7  0xb75f3405 in KLockFile::lock (this=0x812ac90, options=@0xbf94d848) 
at /home/mkretz/KDE/src/kdelibs/kdecore/io/klockfile.cpp:132
#8  0xb7567f0e in KConfigINIBackEnd::sync (this=0x82b93a0, bMerge=true) 
at /home/mkretz/KDE/src/kdelibs/kdecore/config/kconfigbackend.cpp:785
#9  0xb7555e08 in KConfigBase::sync (this=0x8295790) 
at /home/mkretz/KDE/src/kdelibs/kdecore/config/kconfigbase.cpp:1171
#10 0xb7560f4d in ~KConfig (this=0x8295790) 
at /home/mkretz/KDE/src/kdelibs/kdecore/config/kconfig.cpp:87
#11 0xb7560fe9 in ~KSharedConfig (this=0x8295790) 
at /home/mkretz/KDE/src/kdelibs/kdecore/config/kconfig.cpp:366
#12 0xb63a9d6b in ~XineEngine (this=0x8128d88) 
at /home/mkretz/KDE/kde4/include/ksharedptr.h:77
#13 0xb60f76c1 in ~Backend (this=0x8128c80) 
at /home/mkretz/KDE/src/branches/work/phonon-xine-threaded/backend.cpp:68
#14 0xb61bdab3 in ~Factory (this=0x826b2e8) 
at /home/mkretz/KDE/src/kdelibs/phonon/factory.cpp:162
#15 0xb61bf4df in KStaticDeleter<Phonon::Factory>::destructObject 
(this=0xb61c7de0) 
at /home/mkretz/KDE/src/kdelibs/kdecore/kstaticdeleter.h:143
#16 0xb759c55b in KGlobal::deleteStaticDeleters () 
at /home/mkretz/KDE/src/kdelibs/kdecore/kernel/kglobal.cpp:185
#17 0xb759c647 in kglobal_postRoutine () 
at /home/mkretz/KDE/src/kdelibs/kdecore/kernel/kglobal.cpp:258
#18 0xb7483369 in qt_call_post_routines () 
at /media/hda7/KDE/src/qt-copy/src/corelib/kernel/qcoreapplication.cpp:122
#19 0xb6dd77e2 in ~QApplication (this=0xbf94db38) 
at /media/hda7/KDE/src/qt-copy/src/gui/kernel/qapplication.cpp:846
#20 0xb7b08f89 in ~KApplication (this=0xbf94db38) 
at /home/mkretz/KDE/src/kdelibs/kdeui/kernel/kapplication.cpp:860
#21 0xb7f46e1e in kdemain (_argc=2, _argv=0xbf94dcd4) 
at /home/mkretz/KDE/src/kdelibs/kcmshell/main.h:34
#22 0x08048742 in main (argc=Cannot access memory at address 0x37c8

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070109/a1c68faa/attachment.sig>


More information about the kde-core-devel mailing list