Summary: | Korganizer stalls when reading iCalendar file with an apparently invalid entry | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Robert Miesen <bobby_miesen> |
Component: | general | Assignee: | Reinhold Kainhofer <reinhold> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 3.5 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Robert Miesen
2006-06-20 10:36:01 UTC
I later found out why this happens. Here's why: When you set up a reoccurring task to to cease repeating after a certain date (like, say, July 12th, 2006) and after that date passes, the bug shows itself and ruins your day. I suffered from the same bug, too. I, like the reporter I guess, experienced difficulty identifying the resposible entry. One can easily confirm that KOrganizer enters an infinite loop by wrapping the reported VTODO entry with usual VCALENDAR entry and letting KOrganizer read it as an iCalendar file. If it is difficult to identify what bug generated the entry, it would be nice if KOrganizer could check the validity of entries while reading iCalendar files if possible, so it would not at least enter the infinite loop. SVN commit 599882 by bram: Prevent infinite loops with some cases of recurring todos. BUG:103761 BUG:129474 M +9 -3 todo.cpp --- branches/KDE/3.5/kdepim/libkcal/todo.cpp #599881:599882 @@ -275,11 +275,17 @@ if ( ( r->duration() == -1 || ( nextDate.isValid() && endDateTime.isValid() && nextDate <= endDateTime ) ) ) { - setDtDue( nextDate ); - while ( !recursAt( dtDue() ) || dtDue() <= QDateTime::currentDateTime() ) { - setDtDue( r->getNextDateTime( dtDue() ) ); + + while ( !recursAt( nextDate ) || nextDate <= QDateTime::currentDateTime() ) { + + if ( !nextDate.isValid() || nextDate > endDateTime ) { + return false; + } + + nextDate = r->getNextDateTime( nextDate ); } + setDtDue( nextDate ); setCompleted( false ); setRevision( revision() + 1 ); |