Runaway loop detected (over 1,000,000 iterations) with Animation Blueprint

We’ve brought our project to 4.11, and I’m seeing log warnings that were never present before.
Runaway loop detected (over 1,000,000 iterations) - see log for stack trace

This is being reported from our Animation Blueprint for our player character. I’m confused because we have no “For” or “While” loops that would be the usual suspects for an infinite loop.

When watching the blueprint while PIE, I see the various movement feeds constantly active in real-time, as I would expect, but nothing that points to a “loop” condition.

Is this just a logging bug in 4.11 where things like animation blueprints are constantly being cycled through, can generate this message, but there’s actually nothing wrong?

None of the search results for this message relate to animations, and I’m afraid I’m chasing this needlessly.

I’ve also noticed that when I move my character, the log file records “Null Object”
I’m currently working to track that down as these two may be inter-twined.

I have this also since 4.12. Have you find the root cause, because I can’t reproduce this log in editor, and in cooked game I just have the “function adress” and not its name.
So it’s hard to track.

Thanks,

In regards to the “Null Object”, it had nothing to do with the Animation Blueprint (like I had originally thought).
With the “Output” log enabled in the Editor, I could see the Null Object warning generate as I moved my character.
After a LOT of Trial & Error (breaking BluePrint node pins), I was able to track it down to the sound being cued by each foot step.
The sound cue in question uses the C++ Node named “SoundNodeLocalPlayer”. The purpose was to be able to play the sound for both the local player, and remote online players. The C++ file is a slightly modified version of the one built in to the Shooter Game example from Epic, and was created during the earlier versions of UE 4.

I simply updated the file to reference changes that are in the current Shooter Game version of the same file. Namely, I changed the entry “ActiveSound.GetAudioComponent()->IsValidLowLevel()”
to
“ActiveSound.GetAudioComponent()”

Pretty simple in the end.

Regarding the 1M iteration warning, there was no loop conditions within the Animation BluePrint (as I suspected), and no indications of runaway iterations.

I simply increased the warning threshold from 1M to 1B. I’m not a fan of this approach, because I would like early warnings of loops gone wild, but the “noise” this would generate would have me chasing my tail too much.

Hi,

Where did you change this setup?

Thanks,

In the Project Settings, under Engine/General Settings; look for “Maximum Loop Iteration Count” under the Blueprints section.

1 Like

Thanks for the tip