Description

The engine may touch freed memory at D3DX12Residency::Internal::RemoveEntryList.
The memory release operation that is causing the problem is in FD3D12DynamicHeapAllocator::AllocUploadResource().
If there are over 128 items in DeferredDeletionQueue, the allocator will release these immediately.

 if (Adapter->GetDeferredDeletionQueue().QueueSize() > 128)
 {
     Adapter->GetDeferredDeletionQueue().ReleaseResources(true, false);
     Allocator.CleanUpAllocations();
 }

The licensee says that removing this code or disabling D3D12.ResidencyManagement can avoid this error.

Steps to Reproduce

It may be reproduced by traveling from a level containing many assets.

Callstack

[Inline Frame] Game.exe!D3DX12Residency::Internal::RemoveEntryList(_LIST_ENTRY * pEntry) Line 368 C++
[Inline Frame] Game.exe!D3DX12Residency::Internal::LRUCache::ObjectReferenced(D3DX12Residency::ManagedObject * pObject) Line 557 C++
Game.exe!D3DX12Residency::Internal::ResidencyManagerInternal::ProcessPagingWork(D3DX12Residency::Internal::ResidencyManagerInternal::AsyncWorkload * pWork) Line 1095 C++
Game.exe!D3DX12Residency::Internal::ResidencyManagerInternal::AsyncThreadStart(void * pData) Line 1021 C++
[External Code]

Have Comments or More Details?

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

4
Login to Vote

Cannot Reproduce
ComponentUE - Rendering Architecture - RHI
Affects Versions4.25
Target Fix4.26
CreatedJul 13, 2020
ResolvedOct 23, 2020
UpdatedNov 20, 2020
View Jira Issue