Starting in Unreal 5.0 (and still present through UE 5.2.1), the plugin we’ve been developing for years has started introducing a crash in packaged builds of any project (on Windows) which we can’t track back to a cause. The plugin and app run correctly in the Editor, and there are no cooking or packaging errors, yet when we go to run the application, a dialog appears with the following error message:
[2023.06.28-23.36.33:718][ 0]LogWindows: Error: appError called: Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7173]
Missing global shader FDisplayMappingPS’s permutation 0, Please make sure cooking was successful.
With our plugin disabled, packaged builds of the app run fine. Can anyone help us pinpoint what aspect of our plugin is tripping up Unreal? Here are the relevant files:
We’ve narrowed the cause of this crash down to having a project which:
Has a module which specifies OpenXRHMD within the PrivateDependencyModuleNames list of its Build.cs file AND
Doesn’t have the OpenXR plugin enabled AND
Uses UE 5.1 or greater
Our plugin includes a module which is dependent on OpenXR, but that module is loaded conditionally; if the plugin starts up and finds that OpenXRHMD is loaded, then it triggers the loading of our OpenXR-dependent module. This way we aren’t forcing developers to include the OpenXR plugin in their project, but if they do, then our OpenXR-specific logic can operate correctly, without any additional work on their part.
It’s still unclear to me why declaring one of our modules as dependent on OpenXR causes OpenXR’s shader to be listed as requiring loading on launch, but doesn’t add it to the list of shaders to cook. I’m having trouble coming up with a clean solution to this - the only workaround I can think of is separating our OpenXR-specific module into a second plugin and having developers import both plugins if they’re building an OpenXR project (much messier than having a single plugin with auto-loaded modules).
Do any Epic Devs have ideas on how to force the shader to be cooked/packaged even if the OpenXR plugin is disabled?
Did you ever come up with a solution for this? I’m having a similar issue. The game I am working on is planned to run in Desktop mode on PC and Mac, as well as PCVR and native Quest.
In my case, the plugin I wrote and main app work fine when building both for PCVR and Android. Since there’s no VR system on the Mac, when building for the Mac that code is all bypassed and the Desktop app for the Mac builds fine.
However, if I try to build an APK for my Quest from the Mac, I run into this error when I execute the APK on the Quest. It seems I can only build an APK from the PC.