This is a common crash that has occurred since at least 4.14

User Descriptions

  • Was playing in editor and ran around my world composition level a little bit and then hit escape to quit.
  • Using the node 'Spawn Level Instance' twice on the same level
  • Loading twice the same level through Load Level Instance BP node
  • Spawning Multiple level instances through for loops
  • Trying to do a procedural random map generation with level streaming

Source Context

  242       void FLevelCollection::RemoveLevel(ULevel* const Level)
  243       {
  244       	if (Level)
  245       	{
  246       		check(Level->GetCachedLevelCollection() == this);
  247       		Level->SetCachedLevelCollection(nullptr);
  248 ***** 		Levels.Remove(Level);
  249       	}
  250       }
Steps to Reproduce
  1. Download and extract this project: [Link Removed]
  2. Open the project in editor.
  3. Play in viewport
  4. Exit PIE.



Assertion failed: Level->GetCachedLevelCollection() == this [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Engine\Private\World.cpp] [Line: 247]

UE4Editor_Engine!FLevelCollection::RemoveLevel() [world.cpp:249]
UE4Editor_Engine!ULevelStreaming::SetLoadedLevel() [levelstreaming.cpp:378]
UE4Editor_Engine!UWorld::UpdateLevelStreamingInner() [world.cpp:2894]
UE4Editor_Engine!UWorld::UpdateLevelStreaming() [world.cpp:2918]
UE4Editor_Engine!UWorld::FlushLevelStreaming() [world.cpp:2961]
UE4Editor_UnrealEd!UEditorEngine::TeardownPlaySession() [playlevel.cpp:682]
UE4Editor_UnrealEd!UEditorEngine::EndPlayMap() [playlevel.cpp:323]
UE4Editor_UnrealEd!UEditorEngine::Tick() [editorengine.cpp:1917]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [unrealedengine.cpp:396]
UE4Editor!FEngineLoop::Tick() [launchengineloop.cpp:3296]
UE4Editor!GuardedMain() [launch.cpp:166]
UE4Editor!GuardedMainWrapper() [launchwindows.cpp:134]
UE4Editor!WinMain() [launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [exe_common.inl:253]
Community References

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-52925 in the post.

Login to Vote

ComponentUE - Gameplay
Affects Versions4.
Target Fix4.19
Fix Commit3794211
Main Commit3804136
Release Commit3813083
CreatedDec 1, 2017
ResolvedDec 7, 2017
UpdatedJul 12, 2019
View Jira Issue