Wrong Infinite Loop

Hello guys,

I’ve done a RPG like battle system that calculates the winning team. In each turn it chooses an attaker and someone to receive the damage. When one of the teams lose all of it’s members the Bp calls the end of the battle.
The problem is that for some reason when the battle reaches a certain number of turns (46 to be exact) it crashes and says that there’s an infinite loop.
Things to consider:

  • There was 46 turns before the crash, so the BP works just fine
  • In each turn there’s something like 30 nodes so there’s no way to reach the unreal loop limit (which I believe it’s 1000000 iterations)
  • When running the debug it crashes in no particular node

Can someone help me with this?
Thanks a lot

ps: I’m using ue 4.7.6

These are always fun. Is 46 a magic number that it always crashes on or is there some variability in it? Is there recursion occurring, a function calling itself (possibly by accident when a variable and a function are named similarly)? Can you post your your nodes?

You can just change the loop limit in project settings / general settings from 1 million to something higher if you are sure your code is not at fault - just for check. But it sounds like the whole thing acts as if it was a single cycle/loop, which sounds unhealthy.