Summary
Crash when changing scalability settings with Android Material Quality overrides and runtime scalability changes enabled in Lyra project
What Type of Bug are you experiencing?
Rendering (Graphics / Niagara)
Steps to Reproduce
[UE 5.8.3][Android][Lyra] Crash when changing scalability settings with Android Material Quality overrides and runtime scalability changes enabled
Summary
In Unreal Engine 5.8.3, the Lyra Starter Game crashes when changing scalability settings at runtime on Android if platform-specific Android Material Quality overrides are enabled (at least i was using “force fully rough” and i didn’t investigated if just enabling “enable quality override” will cause the same crash) and the following configuration is set in AndroidEngine.ini (which is set on 1 by default in Lyra project):
[ConsoleVariables]
dp.AllowScalabilityGroupsToChangeAtRuntime=1
Removing this CVar entry, restoring its default value of 0, resolves the issue in my project.
Environment
- Engine version: Unreal Engine 5.8.3
- Project: Lyra Starter Game
- Target platform: Android
- Graphics APIs: Vulkan and/or OpenGL ES, depending on the enabled material-quality overrides
- Affected functionality: Runtime scalability changes with platform-specific Android Material Quality overrides
Steps to Reproduce
-
Open Lyra Starter Game in Unreal Engine 5.8.3.
-
Configure and enable platform-specific Android Material Quality overrides in Project Settings for the relevant Android shader platforms.
-
In
AndroidEngine.ini, set:[ConsoleVariables] dp.AllowScalabilityGroupsToChangeAtRuntime=1 -
Package and launch the project on an Android device.
-
Change the scalability settings at runtime.
-
Observe the crash.
Expected Result
Changing scalability settings at runtime should not crash the application when Android Material Quality overrides are enabled.
Actual Result
The application crashes during runtime scalability changes.
The associated log reports:
Failed to find shader map for default material
WorldGridMaterial(/Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial)!
Please make sure cooking was successful
(No inline shaders, null GTSM)
Remove `dp.AllowScalabilityGroupsToChangeAtRuntime=1` from `AndroidEngine.ini`, allowing the CVar to retain its default value of `0`.
With this change, the crash no longer occurs in my testing.
### Expected Result
Changing scalability settings at runtime while the "enable quality override" is set on true with not problem or crash on that specific platform
### Observed Result
Changing scalability settings in runtime (in an installed Android package) causes a crash.
More specifically, the crash appears to be triggered when `Effects Quality` changes to `0` or `1`, whether directly or indirectly, which means changing scalability settings through the in-game settings menu or executing the `scalability` console command can trigger the crash if the resulting configuration changes `Effects Quality` to either of these values.
The issue occurs at runtime in the packaged Android build.
### Affects Versions
5.8
### Platform(s)
Android