Debug build crashes due to missing shader platform info but editor packaged version does not

Hey all, sorry about yet another inscrutable Linux issue, I promise I appreciate that the engine is now more easily available on the platform. I sure wouldn’t be using it on Windows, given I don’t have a development system that has it installed. I’m running on an up-to-date Arch Linux on Plasma Wayland with 32 GB of RAM, AMD 5900X cpu and an AMD 6800 XT gpu, with mesa 23.3.2 drivers. This issue also happened with whatever versions were the latest in September 2023, but the hardware is the same.

I have a locally built Unreal Engine 5.3.2 from the github release tag. I originally got this exact same issue last September using the latest Linux pre-built binaries available. Both times, the issue has been the same assert.

I don’t have any convoluted project setup, this is just the default empty project with C++ enabled, the better graphics option, and starter content. Happens both with Linux Vulkan SM5 or SM6 enabled.

What works: when I open the project in the editor, and package it with the DebugGame configuration, it builds the game and I can start the game up fine. Directly running the following executable from the packaged Linux directory also works great:

./MyProjectName/Binaries/Linux/MyProjectName-Linux-DebugGame

What doesn’t work: a regular debugging build. I’m building the game with Rider’s DebugGame configuration, Game target, and run the MyProjectName program, which ends up calling the following command:

/home/username/.local/lib/unreal-engine-local/Engine/Build/BatchFiles/Linux/Build.sh  MyProjectName Linux DebugGame -Project="/home/username/doc/Unreal Projects/MyProjectName/MyProjectName.uproject"

Which tells me in the logs that it in turn calls:

dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll MyProjectName Linux DebugGame -Project=/home/username/doc/Unreal Projects/MyProjectName/MyProjectName.uproject

That call seems fine to me, like a very straightforward way to build the game, I don’t see any issues here. The build finishes fine, and produces this executable in the project folder:

./Binaries/Linux/MyProjectName-Linux-DebugGame

Running that executable either in Rider or just from the command line in the project directory results in the crash.

The crash, based on running the executable in the debugger, and reading the stack trace, is caused by the TargetedPlatform in LinuxDynamicRHI.cpp:100 having bContainsValidPlatformInfo set to false, meaning it trips the IsValid assert right after (line 101 calls GetMaxSupportedFeatureLevel, which calls FDataDrivenShaderPlatformInfo::GetMaxFeatureLevel, which asserts on the aforementioned boolean). Debugging revealed that the TargetedPlatform is SP_VULKAN_SM5 if it’s enabled in Linux platform settings for the project, and SP_VULKAN_SM6 if SM5 is not but SM6 is.

Based on a cursory look at the code, it appears that these shader platforms are set up based on some configuration files, so I’m assuming that Rider’s regular debugging build is somehow not finding those, but the Packaged Project version is. Any ideas for how to call UnrealBuildTool so that it includes those files, or how to make the game executable find them? Or is this caused by something else? Is this a Rider bug or an UE bug?