Description

Editor crash will occur when a user attempts to enter the Mesh Paint, Landscape, or Foliage modes while Simulating.

Links to CrashReporter:
Foliage: [Link Removed]
Landscape: [Link Removed]
Mesh Paint: [Link Removed]

Regression: Yes
Working: 4.14.3 Binary
Broken: 4.15 Release & 4.16 Main

Update from quick debug (chris.wood):

In this line

UVREditorMode* VREditorMode = GEditor->GetEditorWorldManager()->GetEditorWorldWrapper( Viewport->GetClient()->GetWorld() )->GetVREditorMode();

GetEditorWorldWrapper() returns null because the World is PIE in FEditorWorldManager::OnWorldContextAdd(). So we call GetVREditorMode() on null ptr.

Line was added in CL 3109859 by Yannick.Lange

Steps to Reproduce
  1. Open any project to any level
  2. Begin Simulate (Alt+S)
  3. Enter Mesh Paint mode (do so for Landscape and Foliage modes as well)

RESULT:
Editor will crash upon clicking to enter either Mesh Paint, Landscape, or Foliage modes.

Assertion failed: IsValid() [File:D:\Builds\UE4-Main\Engine\Source\Runtime\Core\Public\Templates/SharedPointer.h]

EXPECTED RESULT:
Either the buttons are blocked from being selected, or the user can successfully enter the Foliage, Mesh Paint, and Landscape modes while Simulating.

Callstack
Assertion failed: IsValid() [File:D:\Builds\UE4-Main\Engine\Source\Runtime\Core\Public\Templates/SharedPointer.h]

UE4Editor_LandscapeEditor!FEdModeLandscape::Enter() landscapeedmode.cpp:478 
UE4Editor_UnrealEd!FEditorModeTools::ActivateMode() editormodemanager.cpp:384 
UE4Editor_LevelEditor!SLevelEditor::ToggleEditorMode() sleveleditor.cpp:1238 
UE4Editor_LevelEditor!TBaseStaticDelegateInstance<void __cdecl() delegateinstancesimpl.h:1027 
UE4Editor_Slate!FUICommandList::ExecuteAction() uicommandlist.cpp:97 
UE4Editor_Slate!SToolBarButtonBlock::OnClicked() stoolbarbuttonblock.cpp:305 
UE4Editor_Slate!SToolBarButtonBlock::OnCheckStateChanged() stoolbarbuttonblock.cpp:330 
UE4Editor_Slate!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,TTypeWrapper<void> __cdecl() delegateinstancesimpl.h:327 
UE4Editor_Slate!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,void __cdecl() delegateinstancesimpl.h:434 
UE4Editor_Slate!SCheckBox::ToggleCheckedState() scheckbox.cpp:299 
UE4Editor_Slate!SCheckBox::OnMouseButtonUp() scheckbox.cpp:190 
UE4Editor_Slate!<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1>::operator() slateapplication.cpp:5052 
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() slateapplication.cpp:238 
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() slateapplication.cpp:5041 
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() slateapplication.cpp:5504 
UE4Editor_Slate!FSlateApplication::OnMouseUp() slateapplication.cpp:5481 
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() windowsapplication.cpp:1698 
UE4Editor_Core!FWindowsApplication::DeferMessage() windowsapplication.cpp:2120 
UE4Editor_Core!FWindowsApplication::ProcessMessage() windowsapplication.cpp:867 
UE4Editor_Core!FWindowsApplication::AppWndProc() windowsapplication.cpp:714 
user32!<Unknown> 
user32!<Unknown> 
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() windowsplatformmisc.cpp:979 
UE4Editor!FEngineLoop::Tick() launchengineloop.cpp:2971 
UE4Editor!GuardedMain() launch.cpp:166 
UE4Editor!GuardedMainWrapper() launchwindows.cpp:130 
UE4Editor!WinMain() launchwindows.cpp:206 
UE4Editor!__scrt_common_main_seh() exe_common.inl:264 
kernel32!<Unknown> 
ntdll!<Unknown> 

Update chris.wood
Same repro and error message but different callstack here (running Debug Editor)

UE4Editor-MeshPaint-Win64-Debug.dll!FEdModeMeshPaint::Render(const FSceneView * View, FViewport * Viewport, FPrimitiveDrawInterface * PDI) Line 2752
UE4Editor-UnrealEd-Win64-Debug.dll!FEditorModeTools::Render(const FSceneView * InView, FViewport * Viewport, FPrimitiveDrawInterface * PDI) Line 800
UE4Editor-UnrealEd-Win64-Debug.dll!FEditorViewportClient::Draw(const FSceneView * View, FPrimitiveDrawInterface * PDI) Line 3507
UE4Editor-UnrealEd-Win64-Debug.dll!FLevelEditorViewportClient::Draw(const FSceneView * View, FPrimitiveDrawInterface * PDI) Line 3925
UE4Editor-Renderer-Win64-Debug.dll!FSceneRenderer::FSceneRenderer(const FSceneViewFamily * InViewFamily, FHitProxyConsumer * HitProxyConsumer) Line 1153
UE4Editor-Renderer-Win64-Debug.dll!FDeferredShadingSceneRenderer::FDeferredShadingSceneRenderer(const FSceneViewFamily * InViewFamily, FHitProxyConsumer * HitProxyConsumer) Line 194
UE4Editor-Renderer-Win64-Debug.dll!FSceneRenderer::CreateSceneRenderer(const FSceneViewFamily * InViewFamily, FHitProxyConsumer * HitProxyConsumer) Line 1453
UE4Editor-Renderer-Win64-Debug.dll!FRendererModule::BeginRenderingViewFamily(FCanvas * Canvas, FSceneViewFamily * ViewFamily) Line 1868
UE4Editor-UnrealEd-Win64-Debug.dll!FEditorViewportClient::Draw(FViewport * InViewport, FCanvas * Canvas) Line 3379
UE4Editor-Engine-Win64-Debug.dll!FViewport::Draw(bool bShouldPresent) Line 1185
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::UpdateSingleViewportClient(FEditorViewportClient * InViewportClient, const bool bInAllowNonRealtimeViewportToDraw, bool bLinkedOrthoMovement) Line 2007
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1755
UE4Editor-UnrealEd-Win64-Debug.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 391
UE4Editor-Win64-Debug.exe!FEngineLoop::Tick() Line 3025
UE4Editor-Win64-Debug.exe!EngineTick() Line 63
UE4Editor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 169
UE4Editor-Win64-Debug.exe!GuardedMainWrapper(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 130
UE4Editor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 206

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Editor - Workflow Systems
Affects Versions4.154.16
Target Fix4.15
Fix Commit3255407
Main Commit3389599
Release Commit3255407
CreatedJan 12, 2017
ResolvedJan 27, 2017
UpdatedJan 20, 2024
View Jira Issue