Why Unreal is detecting Infinite loop ?

i have been trying to create an endless runner game prototype , initially i spawn 10 floor segments inside level blueprint and then as player hits trigger box at the end of each segment , a new floor segment is spawned at the end and previous segment is destroyed . now the problem is , if i get the spawn location of the new segment to be spawned from directly referencing segment at the end of the road everything works fine as intended but if i try to store the location in variable and reference the variable than code complies just fine but at the run time as soon as player hits the trigger box the game crashes with infinite loop detected error.
i am at a loss as to why is this happening and what i am doing wrong .



You could try checking for the player here

Because, I think it’s taking the spawning of the next tile as an overlap, and spawning another, which…