Description

Looks like it's a resource state tracking assert issue on the resource.

Steps to Reproduce

Download the licensee repro here - [Link Removed]

Open in editor, hit PIE play, wait a second, will crash.

Callstack
>	[Inline Frame] UE4Editor-D3D12RHI.dll!FD3D12Resource::GetDefaultResourceState() Line 205	C++
 	UE4Editor-D3D12RHI.dll!TD3D12Texture2D<FD3D12BaseTexture2D>::Lock::__l30::<lambda>() Line 1764	C++
 	[Inline Frame] UE4Editor-D3D12RHI.dll!FD3D12Device::GetCommandContext(unsigned int) Line 89	C++
 	[Inline Frame] UE4Editor-D3D12RHI.dll!FD3D12Device::GetDefaultCommandContext() Line 109	C++
 	UE4Editor-D3D12RHI.dll!TD3D12Texture2D<FD3D12BaseTexture2D>::Lock(FRHICommandListImmediate * RHICmdList, unsigned int MipIndex, unsigned int ArrayIndex, EResourceLockMode LockMode, unsigned int & DestStride) Line 1792	C++
 	UE4Editor-D3D12RHI.dll!FD3D12DynamicRHI::LockTexture2D_RenderThread(FRHICommandListImmediate & RHICmdList, FRHITexture2D * TextureRHI, unsigned int MipIndex, EResourceLockMode LockMode, unsigned int & DestStride, bool bLockWithinMiptail, bool bNeedsDefaultRHIFlush) Line 2129	C++
 	[Inline Frame] UE4Editor-LockTextureIssue.dll!FRHICommandListImmediate::LockTexture2D(FRHITexture2D *) Line 4362	C++
 	[Inline Frame] UE4Editor-LockTextureIssue.dll!RHILockTexture2D(FRHITexture2D * Texture, unsigned int) Line 5456	C++
 	UE4Editor-LockTextureIssue.dll!ATestActor::ReadTexture::__l2::<lambda>(FRHICommandListImmediate & RHICmdList) Line 53	C++
 	[Inline Frame] UE4Editor-LockTextureIssue.dll!EnqueueUniqueRenderCommand(ATestActor::ReadTexture::__l2::void <lambda>(FRHICommandListImmediate &) &&) Line 244	C++
 	UE4Editor-LockTextureIssue.dll!ATestActor::ReadTexture() Line 46	C++
 	UE4Editor-Engine.dll!AActor::TickActor(float DeltaSeconds, ELevelTick TickType, FActorTickFunction & ThisTickFunction) Line 1092	C++
 	UE4Editor-Engine.dll!FActorTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 172	C++
 	UE4Editor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 284	C++
 	UE4Editor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread) Line 886	C++
 	[Inline Frame] UE4Editor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 524	C++
 	UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 710	C++
 	UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 602	C++
 	[Inline Frame] UE4Editor-Core.dll!FTaskGraphImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Line 1480	C++
 	UE4Editor-Core.dll!FTaskGraphImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FGraphEvent>,TInlineAllocator<4,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 1532	C++
 	UE4Editor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 564	C++
 	UE4Editor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1585	C++
 	UE4Editor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 785	C++
 	UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1494	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1736	C++
 	UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 426	C++
 	UE4Editor.exe!FEngineLoop::Tick() Line 4919	C++
 	[Inline Frame] UE4Editor.exe!EngineTick() Line 62	C++
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine) Line 178	C++
 	UE4Editor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 262	C++
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 320	C++
 	[Inline Frame] UE4Editor.exe!invoke_main() Line 102	C++
 	UE4Editor.exe!__scrt_common_main_seh() Line 288	C++
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

Have Comments or More Details?

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

0
Login to Vote

Non-Issue
ComponentUE - Graphics Features
Affects Versions4.26.24.27
Target Fix4.27
CreatedMay 25, 2021
ResolvedJun 2, 2021
UpdatedJun 2, 2021