FHighResScreenShotConfig::Init() sets the materials only in the Editor, due to a #if
WITH_EDITOR block. However, the FViewport class exposes the TakeHighResScreenShot to
non-editor builds as well, leading to a crash when the function is used in non-editor builds
1. Download the attached project, package, then run packaged game, optionally with
debugger attached.
2. Click the screenshot button without the mask checkbox enabled. No crash happens.
3. Enable the mask checkbox, click the screenshot button again. Crash ensues, or a
debug break if the debugger is attached
> HiResScrShotRepo.exe!AddHighResolutionScreenshotMaskPass(FRDGBuilder &
GraphBuilder, const FViewInfo & View, const FHighResolutionScreenshotMaskInputs &
Inputs) Line 823 C++
HiResScrShotRepo.exe!AddPostProcessingPasses(FRDGBuilder & GraphBuilder,
const FViewInfo & View, int ViewIndex, bool bAnyLumenActive, EReflectionsMethod
ReflectionsMethod, const FPostProcessingInputs & Inputs, const Nanite::FRasterResults *
NaniteRasterResults, FInstanceCullingManager & InstanceCullingManager,
FVirtualShadowMapArray * VirtualShadowMapArray, FLumenSceneFrameTemporaries &
LumenFrameTemporaries, const FSceneWithoutWaterTextures &
SceneWithoutWaterTextures, FScreenPassTexture TSRMoireInput) Line 1368 C++
HiResScrShotRepo.exe!FDeferredShadingSceneRenderer::Render(FRDGBuilder &
GraphBuilder) Line 4275 C++
HiResScrShotRepo.exe!RenderViewFamilies_RenderThread(FRHICommandListImmediate &
RHICmdList, const TArray<FSceneRenderer *,TSizedDefaultAllocator<32>> &
SceneRenderers) Line 4413 C++
HiResScrShotRepo.exe!FRendererModule::BeginRenderingViewFamilies::__l87::<lambda>(F
RHICommandListImmediate & RHICmdList) Line 4681 C++
HiResScrShotRepo.exe!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererM
odule::BeginRenderingViewFamilies'::`87'::FDrawSceneCommandName,void
<lambda>(FRHICommandListImmediate &)>>::ExecuteTask(TArray<FBaseGraphTask
*,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool
bDeleteOnCompletion) Line 1311 C++
[Inline Frame]
HiResScrShotRepo.exe!FBaseGraphTask::Execute(TArray<FBaseGraphTask
*,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 919 C++
HiResScrShotRepo.exe!FNamedTaskThread::ProcessTasksNamedThread(int
QueueIndex, bool bAllowStall) Line 758 C++
HiResScrShotRepo.exe!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex)
Line 649 C++
HiResScrShotRepo.exe!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent)
Line 417 C++
HiResScrShotRepo.exe!FRenderingThread::Run() Line 569 C++
HiResScrShotRepo.exe!FRunnableThreadWin::Run() Line 149 C++
HiResScrShotRepo.exe!FRunnableThreadWin::GuardedRun() Line 71 C++
[External Code]
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
Does media player's OpenFile method support dynamically opening a video file?
What is the difference between Camera and CineCamera?
How to assign a value to a member of UMG's UMaterialInterface pointer type in C++?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-181019 in the post.
3 |
Component | UE - Rendering Architecture |
---|---|
Affects Versions | 5.2 |
Target Fix | 5.7 |
Created | Mar 22, 2023 |
---|---|
Updated | Sep 4, 2024 |