Version: (using KDE KDE 3.5.5) Installed from: Debian testing/unstable Packages OS: Linux (also filed in debian as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=251778) Hi! If I try to add /usr/lib/kde3 to the plugin folder for konqueror and 'scan for new plugins', nspluginscan crashes many many times. (currently 18) during the scan. The backtraces looks fairly similar. I will put one here: The other files it currently chokes on on my installation is: /usr/lib/kde3/kcm_fonts.so /usr/lib/kde3/libkxmleditorpart.so.1.0.0 /usr/lib/kde3/kwin3_baghira.so /usr/lib/kde3/libakregatorpart.so /usr/lib/kde3/libkdevdesignerpart.so /usr/lib/kde3/plugins/styles/baghira.so /usr/lib/kde3/konqsidebar_baghirasidebar.so and they are all represented at least 2 times each. I would expect nspluginscan to not crash on them, but just skip them. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1231750944 (LWP 15425)] [KCrash handler] #9 0xb6ef4342 in QPixmap::convertFromImage (this=0xb5e39c10, img=@0xbfb38f70, conversion_flags=64) at kernel/qpixmap_x11.cpp:1236 #10 0xb6fc3c68 in QPixmap::convertFromImage (this=0xb5e39c10, image=@0xbfb38f70, mode=QPixmap::Auto) at kernel/qpixmap.cpp:916 #11 0xb76690f8 in KIconLoader::loadIcon (this=0x8236378, _name=@0xbfb39074, group=User, size=0, state=<value optimized out>, path_store=0x0, canReturnNull=false) at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./kdecore/kiconloader.cpp:639 #12 0xb7669d5a in UserIcon (name=@0xbfb39074, state=0, instance=0x8234158) at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./kdecore/kiconloader.cpp:1377 #13 0xb7669da6 in UserIcon (name=@0xbfb39074, instance=0x8234158) at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./kdecore/kiconloader.cpp:1382 #14 0xb5de40c6 in KXESearchDialog::slotTextChanged () from /usr/lib/kde3/libkxmleditorpart.so.1.0.0 #15 0xb5e28db5 in virtual thunk to KXMLEditorPartIfaceReadWrite::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) () from /usr/lib/kde3/libkxmleditorpart.so.1.0.0 #16 0xb7fcfff4 in ?? () from /lib/ld-linux.so.2 #17 0x08232908 in ?? () #18 0xbfb390c8 in ?? () #19 0xb5dcf3dd in _init () from /usr/lib/kde3/libkxmleditorpart.so.1.0.0 #20 0xb5dcf3dd in _init () from /usr/lib/kde3/libkxmleditorpart.so.1.0.0 #21 0xb7fc57f5 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #22 0xb7fc5921 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #23 0xb77ef687 in _dl_open () from /lib/tls/i686/cmov/libc.so.6 #24 0xb7fc544f in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #25 0xb77eed1f in _dl_open () from /lib/tls/i686/cmov/libc.so.6 #26 0xb6b4ad8e in dlopen () from /lib/tls/i686/cmov/libdl.so.2 #27 0xb7fc544f in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #28 0xb6b4b42d in dlerror () from /lib/tls/i686/cmov/libdl.so.2 #29 0xb6b4ad21 in dlopen () from /lib/tls/i686/cmov/libdl.so.2 #30 0xb76cc32e in sys_dl_open (loader_data=0x0, filename=0x8119ab0 "/usr/lib/kde3/libkxmleditorpart.so.1.0.0") at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./libltdl/ltdl.c:614 #31 0xb76cae31 in tryall_dlopen (handle=0xbfb39548, filename=0x8119ab0 "/usr/lib/kde3/libkxmleditorpart.so.1.0.0") at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./libltdl/ltdl.c:1519 #32 0xb76cb67c in lt_dlopen ( filename=0x8119ab0 "/usr/lib/kde3/libkxmleditorpart.so.1.0.0") at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./libltdl/ltdl.c:2356 #33 0xb761751e in KLibLoader::library (this=0x8087e58, name=0x80d9d70 "/usr/lib/kde3/libkxmleditorpart.so.1.0.0") at /home/ana/Debian/kdelibs/kdelibs-3.5.5a.dfsg.1/./kdecore/klibloader.cpp:429 #34 0x0804bacc in tryCheck (write_fd=11, absFile=@0xbfb397b4) at /tmp/buildd/kdebase-3.5.5a.dfsg.1/./nsplugins/pluginscan.cpp:225 #35 0x0804d79a in scanDirectory (dir=@0xbfb39aa0, mimeInfoList=@0xbfb39a84, cache=@0xbfb399e4) at /tmp/buildd/kdebase-3.5.5a.dfsg.1/./nsplugins/pluginscan.cpp:353 #36 0x0804ebcd in main (argc=8148056, argv=0xb74b6290) at /tmp/buildd/kdebase-3.5.5a.dfsg.1/./nsplugins/pluginscan.cpp:627
Can confirm with current svn 3.5.5
SVN commit 762606 by dfaure: Don't create static QPixmaps in libraries/DSOs; it requires the one who dlopens the DSO to provide a QApplication with GUI enabled. This crashes nspluginscan when it is asked to scan $KDEDIR/lib/kde3 CCBUG: 139042 M +2 -2 kdebase/kcontrol/fonts/fonts.cpp M +6 -5 kdepim/akregator/src/articlelistview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=762606
The kxmleditorpart and baghira developers should do the same: not creating static objects in libraries/DSOs (dynamic shared objects, like plugins and parts and other dlopened modules). And especially not GUI objects like QPixmaps. For singletons the solution is KStaticDeleter (kde3) / K_GLOBAL_STATIC (kde4). For other objects (e.g. QPixmaps), the solution is to create on demand inside a method, possibly using a method-static object (like I did in akregator), or simply from safe "POD" (plain old data type) static data like const char* (like I did in fonts.cpp)
SVN commit 762618 by dfaure: Fix nspluginscan crash due to global QPixmaps. Global objects in libraries are bad! BUG: 139042 M +5 -5 hierarchyview.cpp M +5 -0 hierarchyview.h M +19 -17 propertyeditor.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=762618