It is possible for a class that implements IPreLoadScreen to leak memory if GetPreLoadScreenType returns EngineLoadingScreen and IsDone returns true before the engine signals loading is completed via SetEngineLoadingFinished.
While it does appear the EngineLoadingScreen's must respect the loading state, a memory leak is not an ideal behaviour when violating that requirement. An error when this behaviour triggers or an explicit mention of this pitfall in the comment for IsDone may be preferable.
The root cause appears to be that DrawWindow always builds rendering buffers, but the flush of said buffers only occurs when IsDone returns false.
The reproduction steps here are relatively abrupt. Reproducing this issue may require a decently sized project to induce a sufficient loading time to leak enough memory to crash the application.
1. Create a project that uses a PreLoadingScreen that inherits from PreLoadScreenBase (This will default to EngineLoadingScreen.)
2. Have the PreLoadingScreen always return true, regardless of the current loading state.
3. Elongate the loading time. This is unfortunately left as an exercise for the reader. Using a heavy project is one of the more reliable ways to induce this.
Expected: To not leak memory
Actual: Leak caused by allocating memory when building rendering buffers but never flushing
I am not able to find world outliner how to enable it?
What method is used to fill polygonal regions when drawing spline mesh at run time?
How does TextureRenderTarget2D get TArray<uint8> type data?
How does UMG set overlapping layouts?
How to achieve HLSL Multiple Render Target in Material blueprints?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-237367 in the post.
0 |
Component | UE - Graphics Features |
---|---|
Affects Versions | 5.4, 5.5 |
Created | Jan 9, 2025 |
---|---|
Updated | Jan 9, 2025 |