Fixed editor freeze

Hi,

I upgraded our project from 4.11.2 to 4.12. I tried both, 4.12.0 first, and 4.12.2 after that, but it even occurs in 4.12.3 (github):

When I try to load a big map (which also included 14 sublevels!), the editor completely freezes. I tried several times, also cleared shader caches and stuff like that, but it simply freezes. I can load any other map of the project but this one.

On other big levels, the shader compiling process takes some time, but at least the editor is responding while compiling. On this level, I see the shader compiler processes working (in the task manager), but the editor no longer responds to anything.

I tried waiting for up to 8 hours! The shader worker processes were no longer working (finished I guess) after that time, but the editor still wouldn’t respond! This also happens after I packaged the game (which succeeds, so it seems to not be a cooking issue), but when trying to load the level in game, the same freeze occurs (just without the shader workers)…

I’m clueless. Everything worked fine in 4.11.2. The log files don’t display error messages, there is also no crash. When I tried to attach a debugger to the editor and forced a break, it stopped at some Ambient Cubemap processing code. We use Ambient Cubemaps a lot, however: We use them in other levels, too (even the same Ambient Cubemaps) and we don’t have an issue there.

Also notable: On my 16 GB RAM machine, 91% RAM were in use while editor freeze, but Unreal Engine (Editor) was displayed as the one that consumed the most memory with ~700 MB (… of 16 GB?.. That seemed strange) and in Visual Studio (breakpoint), it said that the editor process took 13 GB RAM.

What can I do?

P.S.: Since we started PS4 development, too, we need to update to 4.12 as we need to use VS 2015 and SDK 3.50, so going back to 4.11.2 is not really an option here.

A little update: I opened every single sublevel one by one, shaders compiled, and I could open and navigate just as intended in these sublevels.

The freeze only happens on the main level (which includes the sublevels).

Also, loading of the level seems to work fine, because when I right-click the map in the content browser, it loads the level, and then starts compiling shaders of the main level (a bit more than 3k) without a freeze.

So the freeze really just happens when i try to make the level visible, not when “loading” the level.

Any ideas what I could do? The next thing I will try is to disable all the post processing volumes, as I think they could have something to do with this issue.

FIXED! I found the issue by debugging the editor, and it turns out, that it was a stupid endless loop and the editor froze because it waited for it to finish.

I also checked the 4.11.2 source code, where this endless loop didn’t occur. PLEASE APPLY THIS FIX TO THE 4.12 BRANCH ASAP, as it may affect other projects as well

Engine\Source\Runtime\Engine\Public\FinalPostProcessing.h, Line 68:

Change from
ContributingCubemaps.RemoveAt(i, /bAllowShrinking=/ false);

to
ContributingCubemaps.RemoveAt(i, /bAllowShrinking=/ true);

This seems stupid as shrinking the array is the expected behaviour here, but setting bAllowShrinking to false prevents it, thus causing an endless loop because i is decremented without checking whether the map really has been removed.

Will update to 4.12 as soon as this bug is in the official 4.12 branch.

Could you, Epic, reply once this has been done? Thanks in advance!

Hey Kyoril,

This has already been reported on the following link, including a pull request:

4.12 infinite loop in engine source + fix

-.

Hey ,
thanks for the link. Didn’t find this one. Turns out that this fix still isn’t in 4.12.3 final release - so the launcher build still isn’t usable by us. Guess we have to wait for 4.12.4 then…