Help with a KMail crash
Tomaz Canabrava
tcanabrava at kde.org
Wed Dec 4 08:55:39 GMT 2024
Hello all, I have a quite annoying kmail crash, tried to debug but the
codebase didn't help much.
The crash happens in `kidentitymanager`, but I believe the culprit is in
kmail itself.
on KMail's `identitynpage.cpp`, method `slotRemoveIdentity` there are only
two relevant calls:
mIPage.mIdentityList->identityTreeModel()->removeIdentities(listIdentityNames);
save();
That in turn calls kidentitymanager's KIdentityManager::commit(),
the commit call fails here, on the iterator access.
for (QList<Identity>::ConstIterator it =
d->shadowIdentities.constBegin();
it != d->shadowIdentities.constEnd();
++it)
{
const int index = seenUOIDs.indexOf((*it).uoid());
The crash is deep down inside QHash so for me this feels like memory
corruption:
Thread 1 "kmail" received signal SIGSEGV, Segmentation fault.
QHash<QString, QVariant>::contains (this=0x555557a79a40, key=...) at
/usr/include/qt6/QtCore/qhash.h:1015
1015 return d->findNode(key) != nullptr;
(gdb) bt
#0 QHash<QString, QVariant>::contains (this=0x555557a79a40, key=...) at
/usr/include/qt6/QtCore/qhash.h:1015
#1 KIdentityManagementCore::Identity::property
(this=this at entry=0x555557a79a30,
key=...)
at
/home/tcanabrava/Data/Projects/kde/src/kidentitymanagement/src/core/identity.cpp
:286
#2 0x00007fffe7923a10 in KIdentityManagementCore::Identity::uoid
(this=this at entry=0x555557a79a30)
at
/home/tcanabrava/Data/Projects/kde/src/kidentitymanagement/src/core/identity.cpp
:353
#3 0x00007fffe7932961 in KIdentityManagementCore::IdentityManager::commit
But all the memory we are directly acessing is in the stack.
Note that the `contains` call doesn't exist on the current code, it was a
try I did to make sure it wouldn't crash. the actuall code has a direct
access to .value().
but, well, it crashed anyway.
Help appreciated.
Tomaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20241204/6362e9ca/attachment.htm>
More information about the kde-devel
mailing list