[4.11 P7] Infinite Loop Detected

I haven’t been able to find a rhyme or reason to this interesting Infinite Loop detection as of yet, but this is what I’m seeing.

This wasn’t happening in P6, and this function hasn’t changed. I’m doing the same thing as before, but about 10% of the time this function runs, the game become unresponsive for a good while, and I get this insanely repetitive log after it exits. (doesn’t pop up with “errors were detected”)

Luckily, the editor doesn’t crash or anything, but this can happen on the first run of the function, or the 20th. It appears ‘random.’

Here is the little function:

It is not very complicated, and I can’t see how it would enter a loop, but I never disregard my own ability to miss something obvious.

I didn’t see anyone else with this problem, but it could be new if it ends up being a bug.

Also, I just noticed this other outlier that seemed out of place:

81691-2016-03-10+11_28_07-message+log.png

It turns out to be a simple Set Bool node:

Seems odd that I can enter an infinite loop by setting a bool variable, no?

Can you provide the call stack and the functions where you call those? Seems that there is a bigger loop that is reaching over multiple functions.

Hi krillin6,

This is expected behavior. You are setting the boolean to true just before running a loop that will continue to run as long as that value is true. This will absolutely cause an infinite loop because you are not giving it a close condition.

To stop the loop, you will have to have a situation that changes the boolean back to false during the while loop to break the loop.

I don’t think you read my entire post. Definitely not the answer.

I’ll go through the code again, but this wasn’t happening in preview 6. It just started as soon as I moved to Preview 7. Also, isn’t the loop detection only supposed to hit once, then stop execution? I’m confused as to why it is detecting so many loops. In the past, if I hit a loop, I believe it would only return one entry in the log, but I’m going from memory on that one.

One of the call stacks is:

Script call stack:
Function /Game/Blueprints/Modes/DC_GameState.DC_GameState_C:ReceiveTick
Function /Game/Blueprints/Modes/DC_GameState.DC_GameState_C:ExecuteUbergraph_DC_GameState
Function /Game/Blueprints/Pawns/AI/Controllers/DC_AIController_Base.DC_AIController_Base_C:Run Behaviors
Function /Game/Blueprints/Pawns/AI/Controllers/DC_AIController_Base.DC_AIController_Base_C:ExecuteUbergraph_DC_AIController_Base
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:A*Navigation
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:Investigate All Neighbors
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:DetermineNeighbor
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:Update Neighbor
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:Search Open Set

The other one is generally:

Script call stack:
Function /Game/Blueprints/Modes/DC_GameState.DC_GameState_C:ReceiveTick
Function /Game/Blueprints/Modes/DC_GameState.DC_GameState_C:ExecuteUbergraph_DC_GameState
Function /Game/Blueprints/Pawns/AI/Controllers/DC_AIController_Base.DC_AIController_Base_C:Run Behaviors
Function /Game/Blueprints/Pawns/AI/Controllers/DC_AIController_Base.DC_AIController_Base_C:ExecuteUbergraph_DC_AIController_Base
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:A*Navigation
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:Investigate All Neighbors
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:DetermineNeighbor
Function /Game/Blueprints/Grid/DC_Grid.DC_Grid_C:Search Closed Set

Most of the time, the “Set Bool” isn’t listed in the list of loops.

I’m going to do a time-intensive deep dive into this, so i’ll be a while. I started logging the length of my “Closed Set” array, and noticed the size looks fine for a while, then it starts to climb, and loop after loop gets detected. It could still be my fault at this point, I’m just trying to figure out what would have changed after updating to Preview 7. I’ll hopefully know for sure fairly soon.

More information (might be unrelated?):

Inside one function (Remove Best Node) I’m getting a flood of some odd warnings:

LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Best Node’ to ‘Set Array Elem’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Best Node’ to ‘Set Array Elem’.

When I step to the next node, I get a new one, mentioning the next nodes:

LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Set Array Elem’ to ‘Remove Index’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Best Node’ to ‘Set Array Elem’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Set Array Elem’ to ‘Remove Index’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Best Node’ to ‘Set Array Elem’.

Then it gets even worse on the third node:

LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Set Array Elem’ to ‘Remove Index’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Index’ to ‘Return Node’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Best Node’ to ‘Set Array Elem’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Set Array Elem’ to ‘Remove Index’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Index’ to ‘Return Node’.
LogConnectionDrawingPolicy:Warning: Looks like a wire-trace was not injected before the jump from ‘Remove Best Node’ to ‘Set Array Elem’.

Anyway, might be unrelated. Just annoying and flooding my Message Logs.

I’m really trying to diagnose this issue, but it is nearly impossible when every single time I skip to the next node, my output log is flooded by hundreds of thousands of warnings that don’t ever stop… I think it is time to go back to 4.10 and deal with that entirely different set of issues, instead of being told by staff that everything is just my fault. Shame on them.