UE5.6 WorldPartitionHLODsBuilder crashes when using WorldPartitionRuntimeSpatialHash

Repro steps:

  • File -> New Level -> Empty Open World
  • World Settings -> Runtime Hash Class -> WorldPartitionRuntimeSpatialHash
  • Add a shape to the scene such as a cube
  • File -> Save Current Level As… -> Give it a name and save
  • World Partition Panel -> Build -> Build HLODs -> Select again Build HLODs
  • Observe crash pop-up and call stack given in Output Log

I am currently getting a crash when running the HLOD builder commandlet when a World Partition map uses WorldPartitionRuntimeSpatialHash as the Runtime Hash Class.

It happens when running from within the editor or the command line such as:

<path and project name> <map> -Run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionHLODsBuilder -SetupHLODs -BuildHLODs -unattended -allowcommandletrendering

The crash does not occur when using the default of WorldPartitionRuntimeHashSet.

LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.24:195][ 0]LogWindows: Error: appError called: Assertion failed: Actor->GetLevel() == LevelToSpawnIn [File:F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\LevelActor.cpp] [Line: 674] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.24:195][ 0]LogWindows: Error: Windows GetLastError: The handle is invalid. (6) LogWorldPartitionEditor: Display: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogAssetRegistry: Display: Asset registry cache written as 66.6 MiB to ../../../../../../../UEProjects/HLOD/Intermediate/CachedAssetRegistry_*.bin LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: === Critical error: === LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: Assertion failed: Actor->GetLevel() == LevelToSpawnIn [File:F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\LevelActor.cpp] [Line: 674] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:454][ 0]LogWindows: Error: [Callstack] 0x00007ffd3d933448 UnrealEditor-Core.dll!FDebug::CheckVerifyFailedImpl2() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:728] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:455][ 0]LogWindows: Error: [Callstack] 0x00007ffd143ef027 UnrealEditor-Engine.dll!UWorld::SpawnActor() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\LevelActor.cpp:674] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:455][ 0]LogWindows: Error: [Callstack] 0x00007ffd143f04ff UnrealEditor-Engine.dll!UWorld::SpawnActor() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\LevelActor.cpp:451] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:455][ 0]LogWindows: Error: [Callstack] 0x0000027762f48003 UnrealEditor-WorldPartitionHLODUtilities.dll!FWorldPartitionHLODUtilities::CreateHLODActors() [F:\p4\UE5\Base\UE5\Engine\Plugins\Editor\WorldPartitionHLODUtilities\Source\Private\WorldPartition\HLOD\Utilities\WorldPartitionHLODUtilities.cpp:213] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:455][ 0]LogWindows: Error: [Callstack] 0x00007ffd15781589 UnrealEditor-Engine.dll!GenerateHLODActorsForGrid’::2'::<lambda_3>::operator()() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\RuntimeSpatialHash\RuntimeSpatialHashHLOD.cpp:223] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:455][ 0]LogWindows: Error: [Callstack] 0x00007ffd157aabe4 UnrealEditor-Engine.dll!FSquare2DGridHelper::ForEachCells() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\RuntimeSpatialHash\RuntimeSpatialHashGridHelper.cpp:102] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:455][ 0]LogWindows: Error: [Callstack] 0x00007ffd157b0b23 UnrealEditor-Engine.dll!GenerateHLODActorsForGrid() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\RuntimeSpatialHash\RuntimeSpatialHashHLOD.cpp:270] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:456][ 0]LogWindows: Error: [Callstack] 0x00007ffd15782118 UnrealEditor-Engine.dll!UWorldPartitionRuntimeSpatialHash::SetupHLODActors’::2'::<lambda_3>::operator()() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\RuntimeSpatialHash\RuntimeSpatialHashHLOD.cpp:518] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:456][ 0]LogWindows: Error: [Callstack] 0x00007ffd157fb383 UnrealEditor-Engine.dll!UWorldPartitionRuntimeSpatialHash::SetupHLODActors() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\RuntimeSpatialHash\RuntimeSpatialHashHLOD.cpp:541] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:456][ 0]LogWindows: Error: [Callstack] 0x00007ffd1584f2e6 UnrealEditor-Engine.dll!UWorldPartition::SetupHLODActors’::2'::<lambda_1>::operator()() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\WorldPartitionStreamingGeneration.cpp:2291] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:456][ 0]LogWindows: Error: [Callstack] 0x00007ffd158be80d UnrealEditor-Engine.dll!UWorldPartition::SetupHLODActors() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Engine\Private\WorldPartition\WorldPartitionStreamingGeneration.cpp:2307] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:456][ 0]LogWindows: Error: [Callstack] 0x00007ffd34e3b588 UnrealEditor-UnrealEd.dll!UWorldPartitionHLODsBuilder::SetupHLODActors() [F:\p4\UE5\Base\UE5\Engine\Source\Editor\UnrealEd\Private\WorldPartition\WorldPartitionHLODsBuilder.cpp:329] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:456][ 0]LogWindows: Error: [Callstack] 0x00007ffd34e37b4b UnrealEditor-UnrealEd.dll!UWorldPartitionHLODsBuilder::RunInternal() [F:\p4\UE5\Base\UE5\Engine\Source\Editor\UnrealEd\Private\WorldPartition\WorldPartitionHLODsBuilder.cpp:269] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:457][ 0]LogWindows: Error: [Callstack] 0x00007ffd34e36353 UnrealEditor-UnrealEd.dll!UWorldPartitionBuilder::Run() [F:\p4\UE5\Base\UE5\Engine\Source\Editor\UnrealEd\Private\WorldPartition\WorldPartitionBuilder.cpp:296] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:504][ 0]LogWindows: Error: [Callstack] 0x00007ffd34e370d4 UnrealEditor-UnrealEd.dll!UWorldPartitionBuilder::RunBuilder() [F:\p4\UE5\Base\UE5\Engine\Source\Editor\UnrealEd\Private\WorldPartition\WorldPartitionBuilder.cpp:129] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:504][ 0]LogWindows: Error: [Callstack] 0x00007ffd33cde18a UnrealEditor-UnrealEd.dll!UWorldPartitionBuilderCommandlet::RunBuilder() [F:\p4\UE5\Base\UE5\Engine\Source\Editor\UnrealEd\Private\Commandlets\WorldPartitionBuilderCommandlet.cpp:295] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ffd33cbb2a7 UnrealEditor-UnrealEd.dll!UWorldPartitionBuilderCommandlet::Main() [F:\p4\UE5\Base\UE5\Engine\Source\Editor\UnrealEd\Private\Commandlets\WorldPartitionBuilderCommandlet.cpp:191] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ff6c3278fa0 UnrealEditor.exe!FEngineLoop::PreInitPostStartupScreen() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3860] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ff6c326e39c UnrealEditor.exe!GuardedMain() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Launch\Private\Launch.cpp:143] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ff6c326e6ba UnrealEditor.exe!GuardedMainWrapper() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:128] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ff6c327209e UnrealEditor.exe!LaunchWindowsStartup() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:282] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ff6c3284e44 UnrealEditor.exe!WinMain() [F:\p4\UE5\Base\UE5\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:339] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:505][ 0]LogWindows: Error: [Callstack] 0x00007ff6c32880fa UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:506][ 0]LogWindows: Error: [Callstack] 0x00007ffde0627374 KERNEL32.DLL!UnknownFunction [] LogWorldPartitionEditor: Error: #### COMMANDLET OUTPUT >> [2025.06.18-07.11.30:506][ 0]LogWindows: Error: LogWorldPartitionEditor: Error: #### END COMMANDLET OUTPUT ####

Hello,

I apologize for the delay. This seems to be fixed in UE5-Main already, although I’m unsure of which cl fix this atm. Is this something that is blocking you currently?

Thanks,

Ryan

Yes, going forward, it’s recommended to use WorldPartitionRuntimeHashSet over WorldPartitionRuntimeSpatialHash (see here):

  • Avoids promotional issues of actors ending up in higher-level cells: Tech Note: World Partition Spatially Loaded Actors are Always Loaded.
  • Supports 3D.
  • Each object holds their HLODSetups layer settings. This means you can reuse your HLOD layer assets across multiple grids without being constrained to the same streaming settings of each one (HLOD cell size and loading range).
  • Licensees can now implement their own partitioning schemes easily, without having to implement custom code for HLODs and Data Layers.

Currently, we’re keeping WorldPartitionRuntimeSpatialHash around for those who are unable to switch over due to being at a certain point in their project’s timeline.

-Ryan

Ryan,

Thanks for the update!

We have indeed ran into other issues with WorldPartitionRuntimeSpatialHash, especially with always loaded actors.

This recommendation should help when we discuss what to continue supporting.

v/r

Nate

Ryan,

Thanks for response.

This currently stops one of our automated tests from continuing, so we just have it disabled for now while upgrading things to UE5.6. We also realize that since the default is WorldPartitionRuntimeHashSet that we might need to simply use that in this instance, but if there is any official word saying to stick to the default that would help.

It would certainly be useful to know which CL (and files) to cherry pick from to fix this, but I understand if it might be grouped into a larger one somewhere.

v/r

Nate