Summary: | korganizer crash at startup for a particular std.ics file | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | berti <bertrand.haut> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | the bogus std.ics file |
Description
berti
2005-03-17 15:27:44 UTC
Created attachment 10163 [details]
the bogus std.ics file
Still crashes in today's 3.5 branch. Reassigning all KOrganizer bug reports and wishes to the newly created korganizer-devel mailing list. SVN commit 614095 by mkoller: BUG: 101696 Break recursive relation to avoid endless loop M +14 -1 kotodoview.cpp --- branches/KDE/3.5/kdepim/korganizer/kotodoview.cpp #614094:614095 @@ -590,6 +590,9 @@ // Use dynamic_cast, because in the future the related item might also be an event Todo *relatedTodo = dynamic_cast<Todo *>(incidence); + // just make sure we know we have this item already to avoid endless recursion (Bug 101696) + mTodoMap.insert(todo,0); + // kdDebug(5850) << " has Related" << endl; QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; itemIterator = mTodoMap.find(relatedTodo); @@ -599,7 +602,17 @@ } // isn't this pretty stupid? We give one Todo to the KOTodoViewItem // and one into the map. Sure finding is more easy but why? -zecke - KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); + KOTodoViewItem *todoItem; + + // in case we found a related parent, which has no KOTodoViewItem yet, this must + // be the case where 2 items refer to each other, therefore simply create item as root item + if ( *itemIterator == 0 ) { + todo->setRelatedTo(0); // break the recursion, else we will have troubles later + todoItem = new KOTodoViewItem(mTodoListView,todo,this); + } + else + todoItem = new KOTodoViewItem(*itemIterator,todo,this); + return mTodoMap.insert(todo,todoItem); } else { // kdDebug(5850) << " no Related" << endl; |