Bug 294005 - Infinite loop in KSelectionProxyModel's _getRootListRow()
Summary: Infinite loop in KSelectionProxyModel's _getRootListRow()
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: Git
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephen Kelly
URL: http://projects.kde.org/projects/kde/...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-13 17:04 UTC by Christopher Yeleighton
Modified: 2024-09-14 17:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2012-02-13 17:04:30 UTC
while (nextParent == commonParent) {
        if (ansList.size() < bestParentRow + 1)
            // If the list is longer, it means that at the end of it is a descendant of the new index.
            // We insert the ancestors items first in that case.
            break;

        const QModelIndex nextSibling = ansList.value(bestParentRow + 1);

        if (!nextSibling.isValid()) {
            continue;
        }

I ran into this when I added a fourth mail repository to KMail.  The code loops from line 185 to line 194; nothing in between affects the condition of line 185.  In effect, KMail hangs on startup and I am unable to access its preferences.
Comment 1 Christopher Yeleighton 2012-02-13 17:31:49 UTC
The backtrace is in Bug 289476
Comment 2 Christian Mollekopf 2014-03-18 10:04:48 UTC
If nextSibling is ever invalid, this indeed results in an endless loop. I'm not sure how to fix it though.
Comment 3 Christoph Cullmann 2024-09-14 17:06:51 UTC
Hi,

kdelibs (version 4 and earlier) is no longer maintained since a few years.

KDE Frameworks 5 or 6 might already have resolved this bug.

If not, please re-open against the matching framework if feasible or against the application that shows the issue.

We then can still dispatch it to the right Bugzilla product or component.

Greetings
Christoph Cullmann