Skip to content

Resolve "Infinite loop during event handling"

Evan Ward requested to merge 684-infinit-loop into develop

Fix infinite loop in event detection

Previously, when a RESET_* event caused two other event detectors to trigger simultaneously and discontinuously at the same time then an infinite loop would occur in acceptStep as it tries to backup up and process the one event before the other, but the even time remains the same. This affects all propagators.

Now tryAdvance allows the other event to occur first if the events are simultaneous.

Also fixes some cases where tryAdvance returns false (indicating the other event should occur) but does not update t0. This erroneously searched for events before the first occuring event if it was as RESET_*. I.e. events could have occured out of chronological order.

Also fixed a bug in CloseEventsTest that caused two events to be simultaneous when they should have been different by 1 ulp.

Also add FieldFunctionalDetector

This needs Hipparchus 1.7-SNAPSHOT to fix the bug.

Closes #684 (closed)

Merge request reports