Description

The engine does not free the LevelRenderAssetManagers array elements in FRenderAssetStreamingManager when changing lighting scenarios.

Following code can avoid this issue.

 

 void FRenderAssetStreamingManager::PropagateLightingScenarioChange()
 {
     FScopeLock ScopeLock(&CriticalSection);
     QUICK_SCOPE_CYCLE_COUNTER(STAT_FRenderAssetStreamingManager_PropagateLightingScenarioChange);
 
     // Note that dynamic components don't need to be handled because their renderstates are updated, which triggers and update.
     
     TArray<ULevel*, TInlineAllocator<32> > Levels;
     for (FLevelRenderAssetManager* LevelManager : LevelRenderAssetManagers)
     {
         if (LevelManager!=nullptr)
         {
             Levels.Push(LevelManager->GetLevel());
             LevelManager->Remove(nullptr);
             delete LevelManager; // add this line
         }
     }
 
 

 

Steps to Reproduce
  1. Open attached project on 4.24 or 4.25 
  2. Set -LLM option to additional command line parameter in advanced option in Play menu
  3. Press standalone game button
  4. After launching, enter "stat LLMFULL" in console command box
  5. See stats

Result:

StreamingManager memory amount keeps increasing.

The screenshot below is from an hour after launch.

[Image Removed]

 

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Rendering Architecture - RHI
Affects Versions4.244.25
Target Fix4.26
Fix Commit14210592
Release Commit14332097
CreatedAug 26, 2020
ResolvedAug 28, 2020
UpdatedJul 23, 2021
View Jira Issue