[Bug] My blueprint setup is freezing editor frequently

Build CL1627304 - K:/TURE/Rocket_CL1627304

Specs Windows 7 Professional English, i7-3770K, 32GB RAM, GTX670 4GB driver 306.23 , UAC off

Description I was trying to make modular buildings, worked fine for a while, but then the editor just froze and upon I cannot add my blueprint to a level anymore. Every time I drag it in, it just freezes the whole engine.

If I disconnect User Construction Script for a moment, then drag it in, then it works fine. If I then re-enable User Construction Script while the blueprint is already in the level, it also works fine and my modular building begins to grow. If I then drag it in again, it still works fine and I now have my blueprint twice. However if I then delete both, and try to drag in a new one it freezes again.

Repro See image. On the right of this image are just a bunch of set location and mesh functions. The end of it loops back to the start, which may be a problem. Overall goal of my setup is to do a trace below the actor, if enough space available → add staticmesh → loop back start and check if there is enough space underneath the new mesh also → add another staticmesh underneath → etc. BP is derived from a staticmeshactor.

Results Freezes editor, no error messages or anything, just stops working entirely.

Expected To display a warning if what I do is not ok, or to simply work.

Having an unbounded loop seems like it is probably the source of your problem. It should just fail with an ‘infinite recursion’ though, rather than locking up. Could you try adding a loop counter with a maximum number allowed, so you can see the situations where it is looping forever? That kind of design is just good practice anyway.

Ah yes, I should have just done that right away. Don’t know why I didn’t try that.

It seems to work now, haven’t gotten it to freeze anymore. Some kind of message or protection system there would be nice though. People may accidentally make these kind of setups.

We did some investigation, and there is a system to catch this problem, but it counts total instructions and not time. The number is pretty high, and as your loop involves spawning things, it will probably take a long time to hit. We’ll look into a better metric for detecting a bad situation.