Description

Running a Screenshot Functional test, is causing an engine crash.

By attaching a debugger to it, AScreenshotFunctionalTestBase::PrepareForScreenshot() is reached and GEngine->GameViewport is null, so it looked like the world for the test might be created as "RunAsDedicated" (PlayLevel.cpp -> CreateInnerProcessPIEGameInstance() ) therefore doesn't get a ViewportClient created & assigned.

Steps to Reproduce
  1. Drag the actor in an empty scene
  2. Saving the scene
  3. Running the test from the Sessions frontend
  4. Observe crash
Callstack

LogWindows: Error: === Critical error: ===
LogWindows: Error: 
LogWindows: Error: Assertion failed: GEngine->GameViewport && GEngine->GameViewport->GetGameViewport() [Link Removed] [Line: 91] 
LogWindows: Error: 
LogWindows: Error: [Callstack] 0x00007ffa231c8afd UnrealEditor-FunctionalTesting.dll!AScreenshotFunctionalTestBase::PrepareForScreenshot() [D:\Dev\ProjectName\dev\Engine\Source\Developer\FunctionalTesting\Private\ScreenshotFunctionalTestBase.cpp:91]
LogWindows: Error: [Callstack] 0x00007ffa231c9536 UnrealEditor-FunctionalTesting.dll!AScreenshotFunctionalTest::PrepareTest() [D:\Dev\ProjectName\dev\Engine\Source\Developer\FunctionalTesting\Private\ScreenshotFunctionalTest.cpp:46]
LogWindows: Error: [Callstack] 0x00007ffa231cffe3 UnrealEditor-FunctionalTesting.dll!AFunctionalTest::RunTest() [D:\Dev\ProjectName\dev\Engine\Source\Developer\FunctionalTesting\Private\FunctionalTest.cpp:282]
LogWindows: Error: [Callstack] 0x00007ffa231cf071 UnrealEditor-FunctionalTesting.dll!UFunctionalTestingManager::RunFirstValidTest() [D:\Dev\ProjectName\dev\Engine\Source\Developer\FunctionalTesting\Private\FunctionalTestingManager.cpp:352]
LogWindows: Error: [Callstack] 0x00007ffa231d8369 UnrealEditor-FunctionalTesting.dll!UFunctionalTestingManager::TriggerFirstValidTest() [D:\Dev\ProjectName\dev\Engine\Source\Developer\FunctionalTesting\Private\FunctionalTestingManager.cpp:173]
LogWindows: Error: [Callstack] 0x00007ffa231b8a4d UnrealEditor-FunctionalTesting.dll!TBaseUObjectMethodDelegateInstance<0,UFunctionalTestingManager,void __cdecl(void),FDefaultDelegateUserPolicy>::Execute() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:601]
LogWindows: Error: [Callstack] 0x00007ffa1e2bba95 UnrealEditor-Engine.dll!FTimerUnifiedDelegate::Execute() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Engine\Public\TimerManager.h:43]
LogWindows: Error: [Callstack] 0x00007ffa1e33c91d UnrealEditor-Engine.dll!FTimerManager::Tick() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Engine\Private\TimerManager.cpp:925]
LogWindows: Error: [Callstack] 0x00007ffa1d5aca96 UnrealEditor-Engine.dll!UWorld::Tick() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1608]
LogWindows: Error: [Callstack] 0x00007ffa1659a70b UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\Dev\ProjectName\dev\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1890]
LogWindows: Error: [Callstack] 0x00007ffa1701cd36 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\Dev\ProjectName\dev\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:517]
LogWindows: Error: [Callstack] 0x00007ff7037485fc UnrealEditor.exe!FEngineLoop::Tick() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5429]
LogWindows: Error: [Callstack] 0x00007ff7037628cd UnrealEditor.exe!GuardedMain() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Launch\Private\Launch.cpp:202]
LogWindows: Error: [Callstack] 0x00007ff7037629ba UnrealEditor.exe!GuardedMainWrapper() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
LogWindows: Error: [Callstack] 0x00007ff7037657a0 UnrealEditor.exe!LaunchWindowsStartup() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
LogWindows: Error: [Callstack] 0x00007ff703777384 UnrealEditor.exe!WinMain() [D:\Dev\ProjectName\dev\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:282]
LogWindows: Error: [Callstack] 0x00007ff70377a6e6 UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
LogWindows: Error: [Callstack] 0x00007ffb382f26bd KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffb3946a9f8 ntdll.dll!UnknownFunction []

Have Comments or More Details?

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

6
Login to Vote

Fixed
ComponentUE - Automation Test
Affects Versions5.1
Target Fix5.3
Fix Commit25290021
Main Commit25290021
CreatedApr 12, 2023
ResolvedMay 1, 2023
UpdatedMay 2, 2023
View Jira Issue