A crash from bad memory access can happen when clearing the textures in a Texture2DArray asset.
This appears to be because the order of operations when deleting the platform data is:
```
if (PrivatePlatformData)
{
delete PrivatePlatformData;
if (PrivatePlatformData)
PrivatePlatformData = nullptr;
}
```
This comes from the functions `UTexture2DArray::InvalidateTextureSource()` and `UTexture2DArray::SetPlatformData(...)` from Texture2DArray.cpp.
1. Download the Licensee's test project (see addl info URL)
2. Launch the text project with the command-line argument "-stompmalloc"
3. Open /Game/NewTexture2DArray
4. Add the texture /Game/Black to the Source Textures
5. Clear the Source Textures via the Remove All Elements button
6. Observe the memory access exception.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-216202 in the post.
0 |
Component | UE - Texture |
---|---|
Affects Versions | 5.4, 5.4.1 |
Target Fix | 5.5 |
Fix Commit | 32792787 |
---|
Created | May 30, 2024 |
---|---|
Resolved | May 31, 2024 |
Updated | Jul 31, 2024 |