C4702 error occurs when creating an installed engine build in UE 5.6

The following error occurred when creating an Installed Build.

D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2\Internal\UtilsCore.h(34) : error C4702: unreachable code inlined at D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(93) <call to UE::PixelStreaming2::IsStreamingSupported> while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1057) : error C4702: unreachable code inlined at D:\UE_5_6_Source\Engine\Source\Runtime\Slate\Public\Framework\Application\SlateApplication.h(310) <call to TSharedPtr<FSlateApplication,1>::IsValid> inlined at D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(98) <call to FSlateApplication::IsInitialized> while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(103) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(105) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Source\Runtime\Core\Public\HAL\IConsoleManager.h(1818) : error C4702: unreachable code inlined at D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(113) <call to TAutoConsoleVariable<FString>::GetValueOnAnyThread> while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(114) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(117) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(138) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(141) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(145) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(162) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(173) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule D:\UE_5_6_Source\Engine\Plugins\Media\PixelStreaming2\Source\PixelStreaming2RTC\Private\PixelStreaming2RTCModule.cpp(188) : error C4702: unreachable code while compiling UE::PixelStreaming2::FPixelStreaming2RTCModule::StartupModule

This is a problem that occurs in void FPixelStreaming2RTCModule::StartupModule() because of the UE_SERVER preprocessor. The problem is solved if you wrap the entire code, except for the UE_SERVER part, with #else and #endif.

재현 방법
Run the InstalledEngineBuild.xml script with server option.

<Batch file​>

call Engine\Build\BatchFiles\RunUAT.bat BuildGraph -script=Engine/Build/InstalledEngineBuild.xml -target="Make Installed Build Win64" -nosign -set:GameConfigurations=Development;Shipping -set:WithWin64=true -set:WithAndroid=false -set:WithDDC=true -set:WithLinux=true -set:WithLinuxArm64=false -set:WithIOS=false -set:WithTVOS=false -set:WithMac=false -set:WithClient=true -set:WithServer=true -set:WithFullDebugInfo=true -nop4 -BUILDMACHINE

Hey there,

This is a known issue that has been raised internally. I will post the public tracker link when it updates.

Edit: Public tracking available here.

Kind regards,

Julian