Description

Crash always occurs when executing Visualize Texture Command with Texture id.

Looks like GVisualizeTexture.Mode doesn't affect correctly.

 

Workaround:

VisualizeTexturePresent.cpp

FVisualizeTexturePresent::PresentContent

if (Element)
{
    FRDGBuilder GraphBuilder(RHICmdList);

    // TRefCountPtr<IPooledRenderTarget> ElementRefCount;
    TRefCountPtr<IPooledRenderTarget> ElementRefCount(Element);

    GVisualizeTexture.CreateContentCapturePass(GraphBuilder, GraphBuilder.RegisterExternalTexture(ElementRefCount));
    GraphBuilder.Execute();
}
Steps to Reproduce
  1. Open any project in editor
  2. Enter the console command "vis 12"

Result:

Crash in editor

Expect:

Not crash

 

Callstack
> [Inline Frame] UE4Editor-RenderCore.dll!FRDGBuilder::RegisterExternalTexture::__l3::<lambda_c53fd7142fb314e800b2597be1aa8ece>::operator()() Line 210 C++
UE4Editor-RenderCore.dll!FRDGBuilder::RegisterExternalTexture(const TRefCountPtr<IPooledRenderTarget> & ExternalPooledTexture, const wchar_t * DebugName) Line 210 C++
UE4Editor-Renderer.dll!FVisualizeTexturePresent::PresentContent(FRHICommandListImmediate & RHICmdList, const FViewInfo & View) Line 387 C++
UE4Editor-Renderer.dll!FSceneRenderer::RenderFinish(FRHICommandListImmediate & RHICmdList) Line 2654 C++
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate & RHICmdList) Line 2024 C++
UE4Editor-Renderer.dll!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 3150 C++
[Inline Frame] UE4Editor-Renderer.dll!FRendererModule::BeginRenderingViewFamily::__l27::<lambda_ef703a768ebf46074e6be04f91ae8efa>::operator()(FRHICommandListImmediate &) Line 3371 C++
[Inline Frame] UE4Editor-Renderer.dll!TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`27'::FDrawSceneCommandName,<lambda_ef703a768ebf46074e6be04f91ae8efa> >::DoTask(ENamedThreads::Type) Line 190 C++
UE4Editor-Renderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`27'::FDrawSceneCommandName,<lambda_ef703a768ebf46074e6be04f91ae8efa> > >::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 842 C++
[Inline Frame] UE4Editor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,FDefaultAllocator> & CurrentThread, ENamedThreads::Type) Line 511 C++
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 686 C++
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 582 C++
UE4Editor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 333 C++
UE4Editor-RenderCore.dll!FRenderingThread::Run() Line 483 C++
UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 96 C++
UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 45 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-76819 in the post.

0
Login to Vote

Cannot Reproduce
ComponentUE - Graphics Features
Affects Versions4.22.04.22.3
Target Fix4.23
CreatedJul 1, 2019
ResolvedJul 17, 2019
UpdatedJul 22, 2019
View Jira Issue