Skip to content

[BUG]Local variable updates do not immediately apply #3953

@CDMalwitz

Description

@CDMalwitz

Make sure you're on the latest stable or beta build

  • I have tested this on the latest stable or beta release

Is this a bug in companion itself or a module?

  • I believe this to be a bug in companion and not a specific module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The attached trigger example will recreate the issue. The trigger uses a conditional WHILE Loop that writes to the log the value of the local variable called "index" and increments it by 1 each time the loop repeats. The loop should only repeat 5 times, but if you look at the log you will notice that it repeats 6 times. Placing a WAIT statement after the local variable update will resolve the issue, but this doesn't seem like a proper way to handle this. Custom variables do not require a Wait statement after being updated. Please note that the next time it runs, the While Loop will not even rexecute because the setting index variable to zero does not get applied. You will need another Wait command after setting to 0.

Steps To Reproduce

Image Image Image Image Image

Log file results after 1st execution (No Waits):

Image

Log file results after 2nd execution(No Waits):

Image

Expected Behavior

With WAIT action after each local variable update (or by using a custom variable without WAITs):

Image

Environment (please complete the following information)

- OS: Mac Silicon
- Browser:  Safari
- Companion Version: v4.2.4

Additional context

No response

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