https://bugs.kde.org/show_bug.cgi?id=435161
Bug ID: 435161 Summary: Baloo crashes with ASSERT in metadatamover.cpp Product: frameworks-baloo Version: 5.80.0 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Baloo File Daemon Assignee: stefan.bru...@rwth-aachen.de Reporter: o...@geek.co.il CC: baloo-bugs-n...@kde.org, n...@kde.org Target Milestone: --- SUMMARY Another Baloo assert crash, this time: ----8<---- Mar 30 19:04:59 vesho baloo_file[2358496]: kf.baloo: Failed to create watch for "/home/odeda/.cache/mozilla/firefox/i1m74zv1.default/safebrowsing-updating/" No such file or directory Mar 30 19:04:59 vesho baloo_file[2358496]: kf.baloo: "/home/odeda/.cache/mozilla/firefox/i1m74zv1.default/safebrowsing-updating/" -> "/home/odeda/.cache/mozilla/firefox/i1m74zv1.default/safebrowsing-backup/" Mar 30 19:04:59 vesho baloo_file[2358496]: ASSERT: "from[from.size()-1] != QLatin1Char('/')" in file [...]src/file/metadatamover.cpp, line 80 ----8<---- Looks like `MetadataMover::updateMetadata()` (that is called from `MetadataMover::moveFileMetadata()` is called for a directory. STEPS TO REPRODUCE I'm not really sure of the process - it has happened during first scan, but it looks like a directory being moved and I think that it was moved before it was indexed, but I'm not sure of the exact process. Regardless, the directory no longer exists - I think it was moved than deleted before baloo got a chance to index it, but I don't think that is related to the problem. OBSERVED RESULT baloo_file crashes and indexing stops. EXPECTED RESULT It shouldn't crash SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.21.80 KDE Frameworks Version: 5.81.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION It looks like the issue is in `KInotify::slotEvent()`, which emits `KInotify::moved` and hits `FileWatch::slotFileMoved`, but looking at the code: ----8<---- // update the path cache if (event->mask & IN_ISDIR) { // ... stuff in case event is for a directory } // qCDebug(BALOO) << oldPath << "EventMoveTo" << path; Q_EMIT moved(QFile::decodeName(oldPath), fname); ----8<---- Which means that `KInotify::moved` is emitted for both directories and files, but `FileWatch::slotFileMoved` expects only files and enforces that with an assert. -- You are receiving this mail because: You are watching all bug changes.