Skip to content

RecurrenceEngine stuck loop detection doesn't work #7

@thedhanawada

Description

@thedhanawada

Problem

The RecurrenceEngine has code to detect when the date stops advancing (stuck loop), but it doesn't actually work. The variable lastDateTimestamp is created but never updated, so the stuck detection never triggers.

File: core/recurrence/RecurrenceEngine.js

What happens

If a recurrence rule causes the date to not advance (like a bad RRULE), the code will loop forever instead of stopping safely.

How to fix

Update lastDateTimestamp at the end of each loop iteration:

// At the end of the while loop, add:
lastDateTimestamp = currentDate.getTime();

This way the code can detect when the date stops changing and break out of the loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions