Download

Infinite Loop can't be stopped

I just created an infinite loop and tested it via simulation. But then I got the “Infinite Loop” message over and over and over and there was no way for me to stop the simulation.

How about a button on that Infinite Loop message like “STOP LOOP”, “ADD BREAKPOINT” or at the very least “STOP SIMULATION/PLAY IN EDITOR”…

I had to close the editor via task manager, which is not the way it should be.

Grats! so you broke the engine. welcome to the club.

you do know that you aren’t supposed to create infinite loops right?

it breaks stuff, starting with your computer!

(most of the time, the editor will pump out a warning even before you try to run it. and honestly that’s more than a user usually gets while coding etc.)
(so yeah, get ctrl - alt - del ready if you’re going to try to break the code because it won’t always be able to Stop!)

I think he’s saying that the editor should automatically stop the game, or at least give the user the option to stop the game, when an infinite loop is detected. I agree with this, if it is possible.

I’m sure he knows you’re not supposed to create infinite loops. But designers are people, and people are not perfect. Sometimes we accidentally create infinite loops.

Hi everyone,

This is already on our radar and a solution is being developed. I don’t have a timeframe of when this will be available but know that it is on the way!

Just please give us editor option to deal with automatic editor shutoffs. Some of us do need the ability to perform billions of iterations without arbitrary shutdowns. :slight_smile:

Has this ever been resolved ?

We’re almost 2017 and this was reported in 2014.

My development speed is really taking a hit due to what seems to be the same issue. I have a while loop that does not want to end and hitting stop in the editor just freezes the editor. All that can be done at this point is kill the editor and reload the project.

Hi there. I have responded to questions about looping issues in this thread: 4.6.1 Hotfix is Live! - Announcements and Releases - Unreal Engine Forums

Also, the fix for the messages was put in 4.8. More details here. And I’ve asked that the message updates be put into this request here.

Thank You Alexander,

I ended up finding the infinite loop limit setting eventually, but my initial search was finding only this thread. I’m french native and probably was not using right terms back then.

btw, i’m still having the infinite loop issue but that’s probably because there is 1 place i’m doing the wrong thing, but i know i’ll figure it out. What doesnt help is that i’m not used with the debugger and its limits. I very often see that a variable is not in scope and can’t see the values. All good though, no need to respond to this.