I ran into a weird bug today that the loop count exceeds 1000 out of nowhere. I then did some debugging and it turns out the global transition is intercepting my actions.
Let's say I have a global transition called A and B, which are broadcasted by another FSM, the global transition takes it, sets a value for A's (or B's) case, and continue with the FSM until there is a conditional statement which compare the current case we are in. And by comparing the value I have different execution path for A and B. But the problem is when the event is send for A (or B) under that compare action, the previous global transition intercepts it, and start over from there and eventually force it into a loop and crash.
Why is global transition behaving this way? I thought they are only listening to the event that's been broadcast or specifically send to them. Why do they intercept event that's not meant for them at all? (Well, those are in fact global transition but I didn't broadcast them)
So how do I workaround this? Do I have to make a separate event for those private execution?
Thanks