[korganizer] [Bug 406881] Infinite loop in sortedPrenodes

2019-11-16 Thread Allen Winter
https://bugs.kde.org/show_bug.cgi?id=406881

Allen Winter  changed:

   What|Removed |Added

 CC||win...@kde.org

--- Comment #3 from Allen Winter  ---
@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

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

[korganizer] [Bug 406881] Infinite loop in sortedPrenodes

2019-04-25 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=406881

--- Comment #2 from Kevin Funk  ---
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
)
 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  : 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);
```

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

[korganizer] [Bug 406881] Infinite loop in sortedPrenodes

2019-04-25 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=406881

--- Comment #1 from Kevin Funk  ---
Note: Following breakpoints are relevant:

10  breakpoint keep y   0x7f382281b332 in
sortedPrenodes(QList > const&) 
   at
/home/kfunk/devel/src/kf5/eventviews/src/todo/incidencetreemodel.cpp:62
breakpoint already hit 3 times
11  breakpoint keep y   0x7f382281b428 in
sortedPrenodes(QList > 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

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