Crash when running editor on command line (Jenkins)

  • I am setting up Jenkins to run tests on a Windows machine.
  • To run the tests, I am using the following command line:
 "%UNREAL_ENGINE_422%/Engine/Binaries/Win64/UE4Editor.exe" ^
    "%WORKSPACE%/%PROJECT_NAME%.uproject" ^
    -unattended -NullRHI ^
    -ExecCmds="Automation Runtests %TESTS%" ^
    -testexit="Automation Test Queue Empty" ^
    -ReportOutputPath="%WORKSPACE%/Saved/TestReport" ^
  • It crashes with the following:

    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: === Critical error: ===
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error:
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: Fatal error: [File:D:\Build++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\GenericPlatform\GenericWindow.cpp] [Line: 106]
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: GetRestoredDimensions is not expected to be called on this platform
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error:
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error:
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: [Callstack] 0x00007ffd9836a839 KERNELBASE.dll!UnknownFunction []
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: [Callstack] 0x00007ffd344b1f37 UE4Editor-Core.dll!UnknownFunction []
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: [Callstack] 0x00007ffd344b46e7 UE4Editor-Core.dll!UnknownFunction []
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: [Callstack] 0x00007ffd342c7d1a UE4Editor-Core.dll!UnknownFunction []
    [2019.08.15-14.12.57:193][ 0]LogWindows: Error: [Callstack] 0x00007ffd3424fe33 UE4Editor-Core.dll!UnknownFunction []

  • The engine is installed and running properly when I launch it manually.

  • The machine is Windows 10 with DX12.

  • I have also tried it without -NullRHI, but then it crashes in a different place (something to do with DX swap chains)

Any ideas how to fix this/work around it?

Hi asmaloney,

You should connect your Jenkins slave through JNLP (Java Web Start). Because naive Jenkins nodes use Windows Service to connect to the master. Windows 10 service does not allow users to have rendering permission :frowning:

By the way… I also suffer from this kind of problem. I did automation test using command line on the ‘mstsc’ connection. (not on Jenkins!!)

call %UE4_EDITOR% %PROJECT% %STARTUP_MAP% -unattended -nopause -NullRHI -ExecCmds="Automation RunTests DH.Asset; Quit" -log -log=RunTest.log -ReportOutputPath=%REPORT_PATH%

The entire callstack is different with asmaloney, but the crashing point is identical (GetRestoredDimensions). It seams like UE4 has a problem to initialize DX resources on certain circumstance.

  • Machine is Windows 10 system with DX12, and it has Nvidia GeForce GTX 750 TI
  • I built my project with ‘Development Editor / Win64’ build configuration using Visual Studio 2017
  • I can launch the editor on ‘mstsc’ connection
  • Yeah, I also tried it without -NullRHI, but it does not work.

Wow… I fix my problem.

In my crash callstack, the FIntroTutorials was the primary caller of GetRestoredDimensions and YES unreal always pops up the tutorial bubble when I opened the editor.

So I disabled tutorial via ‘Editor preferences > Tutorials > Disable all tutorial alerts’ and it crash disappeared magically!!!