Skip to content

Endless loop in class EmitInterval #1628

@tobiasbp

Description

@tobiasbp

Bug Report

If emit_interval is set to 0.0 in class EmitInterval, this loop will never end:

while self._carryover_time >= self._emit_interval:
            self._carryover_time -= self._emit_interval
            emit_count += 1

Recreate by using an emit controller like this:

ec = EmitInterval(0.0)

Potential fix:

# was self._emit_interval = emit_interval
self._emit_interval = max(emit_interval, 0.001)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions