| Summary: | Dolphin crashes while setting up a new KWallet password store for network share credentials | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Gigaman <gigaman> |
| Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | crash | CC: | dolphin-bugs-null, fschaefer.oss, kdedev, kdelibs-bugs-null, postix |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 5.105.0 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=451050 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | https://crash-reports.kde.org/organizations/kde/issues/279083/events/23932fef591d441a8c22520578277e76/ | ||
| Attachments: | New crash information added by DrKonqi | ||
|
Description
Gigaman
2023-02-03 20:07:50 UTC
Created attachment 158532 [details]
New crash information added by DrKonqi
dolphin (23.04.0) using Qt 5.15.9
Steps to reproduce:
1) open Dolphin
2) enter SMB share location (smb://mysambaserver/myusername)
3) enter authentification data in authentification dialog
Result:
Dolphin crashes
-- Backtrace (Reduced):
#4 0x00007f8a8a049e40 in QListData::begin (this=<optimized out>) at /usr/include/qt5/QtCore/qlist.h:118
#5 QList<KFileItem>::begin (this=<optimized out>, this=<optimized out>) at /usr/include/qt5/QtCore/qlist.h:339
#6 KCoreDirListerCache::slotUpdateResult (this=0x7f8a8a0c44c0 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0>, j=<optimized out>) at /usr/src/debug/kio-5.105.0/src/core/kcoredirlister.cpp:1750
#7 0x00007f8a88525232 in QtPrivate::QSlotObjectBase::call (a=0x7fff57862970, r=0x7f8a8a0c44c0 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0>, this=0x55b373974b00) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8 doActivate<false> (sender=0x55b37388ada0, signal_index=6, argv=0x7fff57862970) at kernel/qobject.cpp:3923
(In reply to Frank Schaefer from comment #1) > Steps to reproduce: > ... > 2) enter SMB share location (smb://mysambaserver/myusername) > ... Correction: It happens only if I enter "smb://mysambaserver". Entering "smb://mysambaserver/myusername" doesn't result in a crash. Additional notes: I have KWallet disabled. Samba server version is 4.13.13. Looking int https://invent.kde.org/frameworks/kio/-/blob/v5.105.0/src/core/kcoredirlister.cpp: ... KCoreDirListerCache::slotUpdateResult(): { ... DirItem *dir = itemsInUse.value(jobUrl, nullptr); if (!dir) { qCWarning(KIO_CORE) << "Internal error: itemsInUse did not contain" << jobUrl; #ifndef NDEBUG printDebug(); #endif Q_ASSERT(dir); } else { dir->complete = true; } ... // => so dir can be nullptr and we go on ... for (const KFileItem &item : std::as_const(dir->lstItems)) { // => BOOM. dir is dereferenced without nullptr check. fileItems.insert(item.name(), item); } ... } Looks like it is enough to embrace this loop with a nullptr check, but someone who knows KIO better should validate that. (In reply to Frank Schaefer from comment #3) > Looks like it is enough to embrace this loop with a nullptr check, but > someone who knows KIO better should validate that. Unfortunately it isn't. Looks like KCoreDirListerCache::slotUpdateResult() is supposed to never be called with a KJob whose url isn't on the itemsInUse list. smb:///MyServer is changed to smb://username@MyServer after user name and password have been entered. Apparently this change isn't handled properly, but I failed to track this down further. I'm neither familiar with the KIO caching concept nor do I know all the different use cases in kio-extra components. Changing product to frameworks-kio because the bug is located there. Sounds like a duplicate of bug #451050. The backtrace is nearly identical to bug 507185. Since this was for Plasma 5, I'll merge it into the other report, which is for Plasma 6. Therefore, the backtraces in the other report are more useful in the present. *** This bug has been marked as a duplicate of bug 507185 *** |