Hi @AlienRenders
Thanks for your helpful input.
I’m afraid i have to come back to this iteration counting thing and how it is treated in UE. Let’s stay with your example for now: If the outer ForEach runs 1000 times, and the inner also, its for sure 1Mio iterations for the innermost code portion, but both loop counters itself never exceed 1000. So, there must be some internal instance, multiplying things on runtime (number of loops is not known to the code before effectively getting an array into a ForEach). This is the core of the somewhat theoretical question.
Considering your list of possible infinite loop triggers, just in case i missed someting out here:
First: It was made sure, only ForEach is used, no while loops or other manual looping without breakout condition. There is one Loop where the employed array eventually is altered, but the only option is remove one element, and “no more element is left” is catched.
Second: There is no actor to destroy, as the function runs in an custom uobject. But i will now be aware of this just in case. Thanks for that.
And the last one: Even if there is an internal multiplier for nested loops, there surely must be some timeout conditon to stop nested loop structures from running infinitely (since every single counter inside that nested structure can easily stay small). This one would be somewhat fuzzy and hard to catch.
But anyway, especially if its the last case i encounter here. There is no way around cutting things apart and doing some smaller code portions…