Description

Crash in the editor when changing the view mode.

This occurs because of a nullptr dereference of "InMaterialInterface" in the FDebugViewModeMaterialProxy constructor (Line 32 in DebugViewModeMaterialProxy.cpp). 

This stems from a null key being added from FDebugViewModeMaterialManager::GetShader_RenderThread to the MissingShaderKeys set.

Steps to Reproduce
  1. Make a blueprint actor.
  2. Add a paper sprite component to the actor.
  3. Set a sprite (I used the engine's DummySprite) on the paper sprite component.
  4. Drag the actor you just created into the scene.
  5. Enable View Mode 'Level Of Detail Coloration-> Mesh Lod Coloration'
  6. Crash. Tested on both the official binary engine and on an engine compiled from source.
Callstack

> UE4Editor-Engine-Win64-Debug.dll!FDebugViewModeMaterialProxy::FDebugViewModeMaterialProxy(UMaterialInterface * InMaterialInterface, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type InFeatureLevel, bool InSynchronousCompilation, EDebugViewShaderMode InDebugViewMode) Line 31 C+> UE4Editor-Engine-Win64-Debug.dll!FDebugViewModeMaterialProxy::FDebugViewModeMaterialProxy(UMaterialInterface * InMaterialInterface, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type InFeatureLevel, bool InSynchronousCompilation, EDebugViewShaderMode InDebugViewMode) Line 31 C  UE4Editor-Engine-Win64-Debug.dll!FDebugViewModeMaterialManager::Update() Line 114 C  UE4Editor-Engine-Win64-Debug.dll!UpdateDebugViewModeShaders() Line 28 C  UE4Editor-UnrealEd-Win64-Debug.dll!FEditorViewportClient::Draw(FViewport * InViewport, FCanvas * Canvas) Line 3782 C  UE4Editor-Engine-Win64-Debug.dll!FViewport::Draw(bool bShouldPresent) Line 1559 C  UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::UpdateSingleViewportClient(FEditorViewportClient * InViewportClient, const bool bInAllowNonRealtimeViewportToDraw, bool bLinkedOrthoMovement) Line 2127 C  UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1849 C  UE4Editor-UnrealEd-Win64-Debug.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 426 C  UE4Editor-Win64-Debug.exe!FEngineLoop::Tick() Line 4834 C  UE4Editor-Win64-Debug.exe!EngineTick() Line 63 C  UE4Editor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine) Line 172 C  UE4Editor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * _formal, int nCmdShow) Line 257 C  [Inline Frame] UE4Editor-Win64-Debug.exe!invoke_main() Line 102 C  UE4Editor-Win64-Debug.exe!_scrt_common_main_seh() Line 288 C+  kernel32.dll!00007ffa9ffa7034() Unknown  ntdll.dll!00007ffaa1d5d0d1() Unknown

Have Comments or More Details?

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

1
Login to Vote

Duplicate
ComponentUE - Graphics Features
Affects Versions4.264.26.15.0
CreatedJan 11, 2021
ResolvedJan 11, 2021
UpdatedJan 13, 2021
View Jira Issue