If I trigger the Open Level node through a Keyboard Event (e.g. key “K” is pressed), everything works fine, if I however trigger the Open Level node after an Overlap event (as seen in the image), UE crashes. Any idea why?
You might have more success with open level by name
Using the “Open Level By Name” node leads to the same issue, i.e. UE crashes.
Does it crash immediately, or after say, 10 seconds?
Try the open level node with a simple level, like the default player level.
It crashes immediately, like after 1 second max.
To give some more context to understand the issue, the blueprint from the image above is within an actor that contains the Collision Box that I check the overlap event on for opening the next level.
Could you maybe remove your conditional class check and just open the level on overlap? And do you have the log of the crash by chance?
Opening the level immediately on overlap without any other checks being done also results in the same issue, UE crashes.
Resulting Log of the crash:
(Context: Trying to open level “4x4” from level “L0”)
Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp] [Line: 15062] Old World /Game/NewMaps/UEDPIE_0_L0.L0 not cleaned up by GC! Object World /Game/NewMaps/UEDPIE_0_L0.L0 is being referenced by TransBuffer /Engine/Transient.TransBuffer_0: (root) UnrealEdEngine /Engine/Transient.UnrealEdEngine_0 → TObjectPtr UEditorEngine::Trans = TransBuffer /Engine/Transient.TransBuffer_0 → UTransBuffer::AddReferencedObjects((PendingKill) World /Game/NewMaps/UEDPIE_0_L0.L0) ^ FTransaction::FPersistentObjectRef::AddReferencedObjects() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorTransaction.cpp:732] ^ FTransaction::FObjectRecord::AddReferencedObjects() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorTransaction.cpp:763] ^ FTransaction::AddReferencedObjects() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorTransaction.cpp:828] ^ UTransBuffer::AddReferencedObjects() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorTransaction.cpp:1219] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ This reference is preventing the old World from being GC’d ^
UnrealEditor_Engine!UEngine::FindAndPrintStaleReferencesToObject() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:15059]
UnrealEditor_UnrealEd!UEditorEngine::VerifyLoadMapWorldCleanup() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:7049]
UnrealEditor_Engine!UEngine::LoadMap() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:13908]
UnrealEditor_Engine!UEngine::Browse() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:13412]
UnrealEditor_Engine!UEngine::TickWorldTravel() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:13610]
UnrealEditor_UnrealEd!UEditorEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1751]
UnrealEditor_UnrealEd!UUnrealEdEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:474]
UnrealEditor!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5215]
UnrealEditor!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:183]
UnrealEditor!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
UnrealEditor!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
UnrealEditor!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]
UnrealEditor!__scrt_common_main_seh() [d:\a01_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
Something in the Editor is directly referencing your level, and preventing GC. And at that it’s telling us that it’s being transacted, which means something that’s part of the Undo/Redo system is referencing that level. Do you have any editor utility widgets?
I’m not familiar with what Editor Utility Widgets are. After some googling to see what it is, then looking again at my UE project, I don’t believe I have used any of those.
Is there any way to find out where these references come from?
I don’t think the transaction system is going to show up, but you can right click the level asset and ViewReferences. That’s only going to display the other assets that reference the level and vice versa.
Do you have two copies of the editor open?
Do you mean as in if I opened the project I’m working on twice and would therefore have 2 UE tabs?
Yes.
Then the answer to your question is: No, I only have 1 editor open.
And you’re saved the level?
Yes
To give more context, the project I’m developing is a VR project, having based it on the UE VRTemplate project.