Hello,
This crash seems related to streaming in large textures (8K and above), but we haven’t been able to reproduce it internally or understand how it might happen by just examining the code. Is anybody in this thread able to apply some code modifications and reproduce the crash, so we can get more information? If so, please replace the check() in D3D12Resources.cpp at line 1313 with the following block:
uint32 RefCount = UnderlyingResource->GetRefCount();
if (RefCount != 1)
{
FString UnderlyingResName = UnderlyingResource->GetName().ToString();
FString OwnerName = TEXT("UNKNOWN");
if (Owner && Owner->GetResource())
{
OwnerName = Owner->GetResource()->GetName().ToString();
}
UE_LOG(LogD3D12RHI, Fatal, TEXT("Underlying resource has unexpected ref count %u, name: %s, owner name: %s"), RefCount, *UnderlyingResName, *OwnerName);
}
If the crash still occurs, please attach the last few lines in the log (there should be a fatal error at the end, instead of the assertion failure you get now).
Would it be possible to simplify one of the crashing projects and share it with us, so we can debug it? It should be possible to remove most things except the high-res textures and the assets which use them. (We’ve built a streaming stress test project with large textures internally, but so far haven’t been able to reproduce the issue.)