OpenLevel "crashes" Editor, but not with every level

Hi there!

My colleagues and I encountered a problem recently that we can’t seem to figure out.

At the end of our levels, we call a method in Blueprint that will launch the next level using the Open Level Node. Some levels do open correctly, and other levels just never open…

Here’s what the exec looks like:

So depending on the level we’re currently in, we load the next level.
Yes, all Level Name has been written correctly.

The only working transitions are between 1A_P & 1B_P and 3_P & 4_P. Any other transitions does not work.

We tried loading these levels through the Main Menu, and the same levels don’t load.
We thought it could be only because the levels are heavy and long to load, but UE4 is not responding and it is impossible to press Stop: we have to shut down UE4 by force. It’s the same problem both in Viewport and PIE.

283897-notresponding.png

When debugging, we put breakpoints on the Open Level nodes: the flow did reach the node, so the problem is not before that (nor the GetCurrentLevelName nor the Switch).

We just can’t seem to figure what’s going on. Does anybody have a clue?

Hi, did you try to open the levels from the editor and hit play?

verify this for all levels

Hey there,

How long did you wait while UE4 Editor was stuck opening the levels?

Have you opened these levels in the editor to check that all the shaders been compiled for the level?

If you package the game, does this occur there as well?

Yes, and it works.

Hi,
We waited around 10 minutes and nothing moved. We did the same with the logs open to see if something was really loading or not, and no log is written after a certain point (no more logs 30 sec after the OpenLevel node is hit)

We open these levels in the editor daily. We’re in blocking phase and have close to no shader, so this can’t be the problem.

We haven’t try packaging the game yet. If we do in the next weeks I’ll keep you guys updated.

try something, at its main level in the level blueprint use open level and write the name of the levels try this for each level separately, if you do not give an error then some error has its code.

I didn’t try for each yet, but I did set the Open Level node on a keybind to try if the problem was from the normal flow of the level (Ending cutscene → Then Open) or simply from trying to open the Level and it didn’t work any better.
I can try with each if you’d like, but I highly expect the same result.

Yep, Open Level is a blocking operation, UE4 will freeze completely until the level has been completely loaded. You can try using Level Streaming (Level Streaming in Unreal Engine | Unreal Engine 5.1 Documentation) which is non-blocking (and aimed for Open World). But, just to test, see if these maps do get loaded using this method.
I prefer this method over Open level because you can add animations to the loading screens! Although there are some cases (e.g. Multiplayer) where Open Level is absolutely necessary.

EDIT: Also, if the maps do get too big, you should use level streaming to load only the parts of the maps you want the character to see and unload parts of the maps (e.g. caves) that will not be necessary for a while!

I don’t know if this can help you, but I have solved several bugs in this way

make a backup of your project, now delete the following folders:

Binaries, Intermediate and Saved.

and rebuild your project files by opening your .uproject file, a message will appear and click on “yes”

Hi,
We’ve done that a bunch for other reasons. Didn’t change a thing.

Thank you anyway!

Hi, thanks for your answer!

I don’t think we want to use Level Streaming to pass from one map to the other. We already use Streaming methods for the inside of our levels, which have a bunch of streaming level each to fit our workflow.
Streaming between our 7 main Maps would be hell as we would have to handle streaming on 100+ levels.

I’m still keeping your idea in case we absolutely find nothing to carry on, but I feel like it will be awfull to handle 100+ levels at once. It doesn’t seem to fit with the kind of project we are currently working on.

Thank you anyway!

Hi!
We are still stuck with our problematic even though we tried different things if someone has a clue your help would be amazing!

Today transition between Stage 4 and 5 worked but we still don’t know why. We are currently trying to figure out what we did differently in order to come to an answer.

I’m getting the same error on the open level node when the player clicks on the start game button on UI.
Every time my editor crashes nowadays, in starting the editor loads the map in 10-25sec but now instead of opening it crashes by itself. Thank you.
This is the error that below, please help.

LoginId:39b8cfd7452208181475e6ab5272eab7
EpicAccountId:73aa3c9a2cd14b0c805dd201c2a00f6b

Assertion failed: IsInRenderingThread() || IsInGameThread() || IsAsyncLoading() || GIsSavingPackage [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials/MaterialInstanceSupport.h] [Line: 39]

UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Renderer
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll