[Tickets #12160] Re: Infinity loop on event with recurrence

noreply at bugs.horde.org noreply at bugs.horde.org
Sun Aug 25 21:23:39 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12160
------------------------------------------------------------------------------
  Ticket             | 12160
  Updated By         | Thomas Jarosch <thomas.jarosch at intra2net.com>
  Summary            | Infinity loop on event with recurrence
  Queue              | Kronolith
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Rubinsky
+New Attachment     |  
0001-Fix-_listEvents-for-recurrence-without-fixed-end-dat.patch
------------------------------------------------------------------------------


Thomas Jarosch <thomas.jarosch at intra2net.com> (2013-08-25 21:23) wrote:

After several hours of debugging I finally figured out what's going on:
The code to exclude recurring objects ending in the past was not  
working correctly.

Consider this scenario:
We call _listEvents($startDate = "2012-10-20", $endDate=null). We have  
the following event:

     start: 2012-09-17 10:00
     end: 2012-09-17 12:00
     recurrence: type: daily, start: 2012-09-17, interval: 2

As there is no fixed recurrence end date, the current code failed
to examine the recurrence and passed that event on to Kronolith::addEvents().

Kronolith::addEvents() later on noticed it's a recurring event and
tried to calculate the start date of the event as "$startDate =  
$event->nextRecurrence($startDate)".
It didn't expect that nextRecurrence() might return false and then ran  
into an endless loop.

Attached patch fixes the recurrence handling.

With this patch applied, the endless loop is gone
(and my safety protection loggers don't detect anything).

The SQL driver already works correctly.




Thomas Jarosch <thomas.jarosch at intra2net.com> (2013-08-25 21:23)  
uploaded:  
0001-Fix-_listEvents-for-recurrence-without-fixed-end-dat.patch

http://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=0001-Fix-_listEvents-for-recurrence-without-fixed-end-dat.patch&ticket=12160&fn=%2F0001-Fix-_listEvents-for-recurrence-without-fixed-end-dat.patch





More information about the bugs mailing list