Summary: | Infinite loop in sortedPrenodes | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Kevin Funk <kfunk> |
Component: | incidence viewer | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | REPORTED --- | ||
Severity: | grave | CC: | winter |
Priority: | NOR | ||
Version: | GIT (master) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Kevin Funk
2019-04-25 08:30:27 UTC
Note: Following breakpoints are relevant: 10 breakpoint keep y 0x00007f382281b332 in sortedPrenodes(QList<QSharedPointer<PreNode> > const&) at /home/kfunk/devel/src/kf5/eventviews/src/todo/incidencetreemodel.cpp:62 breakpoint already hit 3 times 11 breakpoint keep y 0x00007f382281b428 in sortedPrenodes(QList<QSharedPointer<PreNode> > const&) at /home/kfunk/devel/src/kf5/eventviews/src/todo/incidencetreemodel.cpp:67 breakpoint already hit 62 times p node p uid.toLatin1().constData() cont Managed to find the culprit by printing some more debug output and thereby locating the problematic calendar folder The final fix was to clear the Akonadi cache for that particular calendar folder; I think that helped. Not sure how I got in that state to begin with. I think that 'sortedPrenodes' should probably be more graceful for situations like this and not run into an infinite loop in any case(?) Here's the tmp patch (just for the record): ``` diff --git a/src/todo/incidencetreemodel.cpp b/src/todo/incidencetreemodel.cpp index c6b03d4..88dc935 100644 --- a/src/todo/incidencetreemodel.cpp +++ b/src/todo/incidencetreemodel.cpp @@ -59,11 +59,13 @@ static PreNode::List sortedPrenodes(const PreNode::List &nodes) PreNode::List remainingNodes = nodes; while (prenodeByUid.count() < count) { + qDebug() << "FOO: " << remainingNodes << "- prenodeByUid.count:" << prenodeByUid.count() << "- count:" << count; bool foundAtLeastOne = false; // this bool saves us from infinit looping if the parent doesn't exist for (const PreNode::Ptr &node : nodes) { Q_ASSERT(node); const QString uid = node->incidence->instanceIdentifier(); const QString parentUid = node->incidence->relatedTo(); + qDebug() << " uid" << uid << "- parent uid:" << parentUid << "- desc:" << node->incidence->description() << "- summary:" << node->incidence->summary(); if (parentUid.isEmpty()) { // toplevel todo prenodeByUid.insert(uid, node); remainingNodes.removeAll(node); ``` @Kevin: I'm not sure if we should resolve this or not. if there is a bug, it would see to be in Akonadi and not KOrganizer |