Skip to main content
B
3mo ago

State machine exceeded max iterations

When running on IOS (Unity), I get the following message spamming in Xcode:

"state machine exceeded max iterations"

Any idea what to do about this?

3 replies
B
F
J
J
(edited) 3mo ago

This is tricky to debug but basically you've got a loop somewhere in your state machine. Be wary of multiple states that can be true at the same time, especially from the "Any State" entry point. For instance, I had this happen recently with a button. I had a disabled bool and a hovered bool. The button started continuously switching when the button was disabled and hovered because both states are true at the same time and loop back and forth forever. I fixed this by having hovered only be active if hovered was true AND disabled was false.

If you want help debugging, please share your state machine that is giving you the error.

B
3mo ago

Thanks, I will look further into it. I guess that a Rive debugger would be very helpful.

F
3mo ago

Having the same problem in WebJS canvas. It's a very big rive file with lots of sub-artboards and sub-statemachines, so it's very difficult to track where the error is without a proper debugger.