When running the editor with
Game -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionHLODsBuilder -BuildHLODs Map -unattended
We are getting stuck in WorldPartitionHLODUtilities.cpp in the LoadSourceActors() function in the following loop:
const float STREAMING_WAIT_DT = 0.1f;
while (IStreamingManager::Get().StreamAllResources(STREAMING_WAIT_DT) > 0)
{
// Application tick.
FTaskGraphInterface::Get().ProcessThreadUntilIdle(ENamedThreads::GameThread);
FTSTicker::GetCoreTicker().Tick(static_cast<float>(FApp::GetDeltaTime()));
}
During the IStreamingManager::Get().StreamAllResources() call, it calls UpdateResourceStreaming(0, true), which seems to reset all inflight streaming and recreate the streaming tasks, although I’m not familiar with the process; it does call BlockTillAllRequestsFinished() afterward and goes inside FRenderAssetStreamingManager::BlockTillAllRequestsFinished(), and we hit the following line:
UE_LOG(LogContentStreaming, Log, TEXT(“Blocking on texture streaming: %.1f ms (%d still in flight)”), BlockedMillis, NumOfInFlights);
At each loop, it gets at that same “Blocking on textute streaming”, with around the same ~100 ms value, with around the same value still in flight.
As a fix, we changed this to the following:
const float STREAMING_WAIT_DT = 0.1f;
if (IStreamingManager::Get().StreamAllResources(STREAMING_WAIT_DT) > 0)
{
do
{
// Application tick.
FTaskGraphInterface::Get().ProcessThreadUntilIdle(ENamedThreads::GameThread);
FTSTicker::GetCoreTicker().Tick(static\_cast\<float\>(FApp::GetDeltaTime()));
}
while (IStreamingManager::Get().BlockTillAllRequestsFinished(STREAMING_WAIT_DT, true) > 0);
}
This solved our issue just by letting the streaming manager does it thing, and wait until everything is done.
I’d like an input if this is a correct fix.
Thanks
[Attachment Removed]