When using nullrhi, the Texture->Resource variable in UAsyncTaskDownloadImage::HandleImageRequest is null and a crash occurs in WriteRawToTexture_RenderThread.

Steps to Reproduce
  1. Open attached project on 4,25  [Link Removed]
  2. Press File>Package Project>Windows(64bit)
  3. Launch the game with "-nullrhi -log" command line option.


The game crushes (see call stack)

UE4Game.exe!FTexture2DDynamicResource::GetTexture2DRHI() Line 81	C++	Symbols loaded.
UE4Game.exe!WriteRawToTexture_RenderThread(FTexture2DDynamicResource * TextureResource, TArray<unsigned char,TSizedDefaultAllocator<64>> * RawData, bool bUseSRGB) Line 23	C++	Symbols loaded.
UE4Game.exe!TGraphTask<TEnqueueUniqueRenderCommandType<`UAsyncTaskDownloadImage::HandleImageRequest'::`18'::FWriteRawDataToTextureName,<lambda_5b8d6e544bf2cdcf9314ad29dca60d99>>>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread) Line 852	C++	Symbols loaded.
[Inline Frame] UE4Game.exe!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 516	C++	Symbols loaded.
UE4Game.exe!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 692	C++	Symbols loaded.
UE4Game.exe!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 587	C++	Symbols loaded.
UE4Game.exe!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 341	C++	Symbols loaded.
UE4Game.exe!FRenderingThread::Run() Line 492	C++	Symbols loaded.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-100741 in the post.

Login to Vote

ComponentTools - UMG
Affects Versions4.25
Target Fix4.26
CreatedOct 8, 2020
UpdatedOct 23, 2020