<div dir="ltr">Hey all,<div><br></div><div>I recently fixed attica's plugin loading so it now finds and loads the attica_kde.so plugin but when applications using knewstuff (and thus attica) close it's giving a segfault when the PlatformDependent object is destructed. I've not done much at all with plugins in the past, but I've never seen a backtrace like this and thought someone else on this list must have and would know how to fix it or what's going wrong.</div><div><br></div><div>To test I'm running khotnewstuff (from knewstuff tests folder) and on closing the dialog I'm getting this backtrace from the segfault.</div><div><br></div><div>
<div>
<span style="font-family:monospace"><span style="color:rgb(0,0,0)">Program received signal SIGSEGV, Segmentation fault.
</span><br>0x00007ffff720057e in QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>::~QExplicitlySharedDataPointer (this=0xa13810, __in_chrg=<optimized out>)
<br> at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qshareddata.h:156
<br>156 inline ~QExplicitlySharedDataPointer() { if (d && !d->ref.deref()) delete d; }
<br>(gdb) bt
<br>#0 0x00007ffff720057e in QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>::~QExplicitlySharedDataPointer (this=0xa13810, __in_chrg=<optimized out>)
<br> at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qshareddata.h:156
<br>#1 0x00007ffff71ff978 in QNetworkConfiguration::~QNetworkConfiguration (this=0xa13810, __in_chrg=<optimized out>)
<br> at /home/jeremy/devel/kde/src/qt5/qtbase/src/network/bearer/qnetworkconfiguration.cpp:304
<br>#2 0x00007ffff71bd9e1 in QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate (this=0xa13740, __in_chrg=<optimized out>)
<br> at /home/jeremy/devel/kde/src/qt5/qtbase/src/network/access/qnetworkaccessmanager.cpp:1488
<br>#3 0x00007ffff71bda6c in QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate (this=0xa13740, __in_chrg=<optimized out>)
<br> at /home/jeremy/devel/kde/src/qt5/qtbase/src/network/access/qnetworkaccessmanager.cpp:1499
<br>#4 0x00007ffff4e63c70 in QScopedPointerDeleter<QObjectData>::cleanup (pointer=0xa13740) at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qscopedpointer.h:54
<br>#5 0x00007ffff4e6225b in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer (this=0xa13008, __in_chrg=<optimized out>)
<br> at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qscopedpointer.h:101
<br>#6 0x00007ffff4e577db in QObject::~QObject (this=0xa13000, __in_chrg=<optimized out>) at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/kernel/qobject.cpp:882
<br>#7 0x00007ffff71bae03 in QNetworkAccessManager::~QNetworkAccessManager (this=0xa13000, __in_chrg=<optimized out>)
<br> at /home/jeremy/devel/kde/src/qt5/qtbase/src/network/access/qnetworkaccessmanager.cpp:466
<br>#8 0x00007ffff38e4ba5 in KIO::AccessManager::~AccessManager (this=0xa13000, __in_chrg=<optimized out>) at /home/jeremy/devel/kde/src/frameworks/kio/src/widgets/accessmanager.cpp:121
<br>#9 0x00007ffff38e4bd4 in KIO::AccessManager::~AccessManager (this=0xa13000, __in_chrg=<optimized out>) at /home/jeremy/devel/kde/src/frameworks/kio/src/widgets/accessmanager.cpp:126
<br>#10 0x00007ffff4e59150 in QObjectPrivate::deleteChildren (this=0xa12a10) at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/kernel/qobject.cpp:1950
<br>#11 0x00007ffff4e57768 in QObject::~QObject (this=0xa0eff0, __in_chrg=<optimized out>) at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/kernel/qobject.cpp:1030
<br>#12 0x00007fffd95e77ce in Attica::KdePlatformDependent::~KdePlatformDependent (this=0xa0eff0, __in_chrg=<optimized out>)
<br> at /home/jeremy/devel/kde/src/kde/workspace/plasma-desktop/attica-kde/kdeplugin/kdeplatformdependent.cpp:58
<br>#13 0x00007fffd95e7806 in Attica::KdePlatformDependent::~KdePlatformDependent (this=0xa0eff0, __in_chrg=<optimized out>)
<br> at /home/jeremy/devel/kde/src/kde/workspace/plasma-desktop/attica-kde/kdeplugin/kdeplatformdependent.cpp:61
<br>#14 0x00007ffff4e10947 in QLibraryPrivate::unload (this=0xa02f50, flag=QLibraryPrivate::NoUnloadSys) at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/plugin/qlibrary.cpp:548
<br>#15 0x00007ffff4e1240d in QLibraryStore::cleanup () at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/plugin/qlibrary.cpp:394
<br>#16 0x00007ffff4e10449 in qlibraryCleanup () at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/plugin/qlibrary.cpp:418
<br>#17 0x00007ffff4e10467 in (anonymous namespace)::qlibraryCleanup_dtor_class_::~qlibraryCleanup_dtor_class_ (this=0x7ffff510cf11 <(anonymous namespace)::qlibraryCleanup_dtor_instance_>, <br> __in_chrg=<optimized out>) at /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/plugin/qlibrary.cpp:420
<br>#18 0x00007ffff3fad60f in __cxa_finalize () from /usr/lib/libc.so.6
<br>#19 0x00007ffff4bc7e53 in __do_global_dtors_aux () from /home/jeremy/devel/kde/src/qt5build/qtbase/lib/libQt5Core.so.5
<br>#20 0x00007fffffffe140 in ?? ()
<br>#21 0x00007ffff7dea817 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
<br>Backtrace stopped: frame did not save the PC<br>
<br></span></div></div><div><span style="font-family:monospace">If I change KDEPlatformDependent to keep a QNetworkAccessManager instead of the KIO::AccessManager it doesn't segfault (but I guess we lose the kio desktop integration in thep process) Any idea what is going on here?</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">thanks,</span></div><div><span style="font-family:monospace">Jeremy</span></div></div>