attica_kde.so closing crash

Jeremy Whiting jpwhiting at kde.org
Mon Nov 17 01:18:07 GMT 2014


Hmm, valgrind shows QNetworkAccessManager is reading some location it
shouldn't inside it's destructor:

 ==22353== Invalid read of size 8
==22353==    at 0x59BE57E:
QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>::~QExplicitlySharedDataPointer()
(in /home/jeremy/devel/kde/src/qt5build/qtbase/lib/libQt5Network.so.5.
4.0)
==22353==    by 0x59BD977: QNetworkConfiguration::~QNetworkConfiguration()
(qnetworkconfiguration.cpp:304)
==22353==    by 0x597B9E0:
QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate()
(qnetworkaccessmanager.cpp:1488)
==22353==    by 0x597BA6B:
QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate()
(qnetworkaccessmanager.cpp:1499)
==22353==    by 0x7E20C6F:
QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*)
(qscopedpointer.h:54)
==22353==    by 0x7E1F25A: QScopedPointer<QObjectData,
QScopedPointerDeleter<QObjectData> >::~QScopedPointer()
(qscopedpointer.h:101)
==22353==    by 0x7E147DA: QObject::~QObject() (qobject.cpp:882)
==22353==    by 0x5978E02: QNetworkAccessManager::~QNetworkAccessManager()
(qnetworkaccessmanager.cpp:466)
==22353==    by 0x9083BA4: KIO::AccessManager::~AccessManager()
(accessmanager.cpp:121)
==22353==    by 0x9083BD3: KIO::AccessManager::~AccessManager()
(accessmanager.cpp:126)
==22353==    by 0x7E1614F: QObjectPrivate::deleteChildren()
(qobject.cpp:1950)
==22353==    by 0x7E14767: QObject::~QObject() (qobject.cpp:1030)
==22353==  Address 0x1cd1b758 is not stack'd, malloc'd or (recently) free'd
==22353==
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = khotnewstuff path =
/home/jeremy/devel/kde/build/frameworks/knewstuff/tests pid = 22353
KCrash: Arguments:
/home/jeremy/devel/kde/build/frameworks/knewstuff/tests/khotnewstuff
parley-themes.knsrc
KCrash: Attempting to start /usr/local/lib/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

[1]+  Stopped                 valgrind --leak-check=full ./khotnewstuff
parley-themes.knsrc

then valgrind crashes too :/

BTW, this code is two files, a .h and .cpp in
plasma-desktop/attica-kde/kdeplugin/ if anyone wants to see the code. I
don't have any local changes besides adding qDebug() lines.

On Sun, Nov 16, 2014 at 6:09 PM, Jeremy Whiting <jpwhiting at kde.org> wrote:

> I'm not deleting anything in the destructor except m_wallet which is a
> KWallet. The crash is in the base class destructor QNetworkAccessManager.
> I'll try valgrind. good idea.
>
> On Sun, Nov 16, 2014 at 4:38 PM, Albert Astals Cid <aacid at kde.org> wrote:
>
>> El Dilluns, 17 de novembre de 2014, a les 00:33:17, Thomas L├╝bking va
>> escriure:
>> > On Sonntag, 16. November 2014 21:50:03 CEST, Jeremy Whiting wrote:
>> > > #10 0x00007ffff4e59150 in QObjectPrivate::deleteChildren
>> (this=0xa12a10)
>> > > at
>> > >
>> /home/jeremy/devel/kde/src/qt5/qtbase/src/corelib/kernel/qobject.cpp:1950
>> > > #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
>> >
>> > You do not happen to delete a bechilded member in the destructor
>> explicitly,
>> > are you?
>> >
>> > Ie, sth. like
>> >
>> > KdePlatformDependent() : QObject() {
>> >    m_accessmanager = new AccessManager(this);
>> > }
>> >
>> > ~KdePlatformDependent() {
>> >    delete m_accessmanager;
>> > }
>>
>> Why would this be wrong?
>>
>> Cheers,
>>   Albert
>>
>> >
>> > Cheers,
>> > Thomas
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20141116/3cb632d9/attachment.htm>


More information about the kde-core-devel mailing list