Skip to content

Unpredictable behavior due to ON TIMER usage #12

@a740g

Description

@a740g

InForm currently relies on ON TIMER events to trigger routines like __UI_DoEvents and __UI_UpdateDisplay.

ON TIMER(__UI_RefreshTimer, __UI_FrameRate) __UI_UpdateDisplay

ON TIMER(__UI_RefreshTimer, __UI_FrameRate) __UI_UpdateDisplay

ON TIMER(__UI_EventsTimer, .016) __UI_DoEvents

These routines are complex and can be invoked at unpredictable times, making it difficult to reason about InForm’s internal state when timers fire. This appears to be the root cause of several issues, including those noted in issue #7. Because there’s no clear control over what parts of InForm are executing when a TIMER event fires, it introduces instability and hard-to-reproduce bugs. The GIFPlayerSample demo can be used to easily trigger the issue.

Proposed solution

Avoid using ON TIMER entirely. Instead, manage timing manually and invoke update logic explicitly from the main loop.

'Main loop

This would give us full control over when and how UI updates occur, improving reliability and making InForm easy to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions