https://bugs.kde.org/show_bug.cgi?id=435143

            Bug ID: 435143
           Summary: Baloo crashes often with ASSERT(!url.endsWith('/'))
           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

When indexing, the file indexer stops every few hours and needs to be
restarted. Reviewing the logs, the problem appears to be this:

----8<----
Mar 29 23:26:33 vesho baloo_file[2071207]: ASSERT: "!url.endsWith('/')" in file
[...]src/file/filewatch.cpp, line 100
----8<----

STEPS TO REPRODUCE
1. Stop the file indexer
2. Clear the baloo database
3. Start the file indexer

OBSERVED RESULT
After a while the indexer stops. Running
$ journalctl --user -u $(systemctl --user list-units | grep
app-kcm_fileindexermonitor | awk '{print$1}') | grep ASSERT
shows the assertion from the log.

EXPECTED RESULT
Baloo should not crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.81
Qt Version: 5.15.2

ADDITIONAL INFORMATION

The problematic code seems to be this:
----8<----
    // Directories must always end with a trailing slash '/'
    QString url = urlString;
    if (isDir) {
        Q_ASSERT(!url.endsWith('/'));
        url.append(QLatin1Char('/'));
    }
----8<----

which seems weird to me - wouldn't it be better to no crash the program in case
the URL ends with '/', especially if you're going to tack it on anyway? Why not
just say: if its a directory, add a slash if is missing, and just continue?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to