stride3d/stride · error · InvalidOperationException
No compatible screen modes found after ranking
Error message
No compatible screen modes found after ranking
What it means
After enumerating candidate devices, FindBestDevice calls RankDevices to order them and throws if zero devices survive ranking. This means device candidates existed but none passed the ranking/compatibility filter, so no GraphicsDeviceInformation can be returned to CreateDevice.
Solutions
- Check that the GPU adapter is enabled and functioning (Device Manager / dxdiag).
- Remove or fix custom device ranking/filtering overrides that might discard all candidates.
- Re-enable full device enumeration by resetting GraphicsDeviceManager settings to defaults and retrying.
Example fix
// before gdm.DeviceCreationFlags |= DeviceCreationFlags.Debug; // custom filters reject all gdm.Ranking = myRankingThatFiltersEverything; // after gdm.Ranking = null; // use default ranking // or verify adapter before creating device
Defensive patterns
Strategy: retry
Validate before calling
// ensure a functional adapter exists before running
if (!GraphicsDevice.IsSupported) throw new PlatformNotSupportedException("No usable GPU adapter"); Try / catch
try { game.Run(); }
catch (InvalidOperationException ex) when (ex.Message.Contains("after ranking"))
{
logger.LogError(ex, "All graphics device candidates were rejected");
throw;
} Prevention
- Verify the GPU adapter is enabled and drivers are healthy (dxdiag).
- Avoid custom Ranking/filter hooks that can reject every candidate.
- Reset GraphicsDeviceManager options to defaults when diagnosing.
When it happens
Trigger: FindBestDevice collects devices (which pass the earlier profile check), then RankDevices filters/orders them and the resulting list is empty — e.g. all candidates rejected due to adapter/outputs constraints or conflicting device description filters.
Common situations: Systems with only software/null adapters, GPU adapter disabled in Device Manager, custom Ranking/DeviceFilter hooks that reject every candidate, or broken multi-GPU configurations.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- None of the graphics profiles
- The length of the destination data buffer is larger than…
- A overlaps with another element. Check the element's offset
- A region can only be specified for Textures with…
- adapter
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/2566eaf6ab10bc04.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Games/GraphicsDeviceManager.cs:696
// Nothing was found; first, let's check if graphics profile was actually supported
// NOTE: We don't do this preemptively because in some cases it seems to take lot of time
// (happened on a test machine, several seconds freeze on ID3D11Device.Release())
if (!IsPreferredProfileAvailable(preferredParameters.PreferredGraphicsProfile, out var availableGraphicsProfile))
{
var notSupportedProfiles = string.Join(", ", preferredParameters.PreferredGraphicsProfile);
throw new InvalidOperationException($"None of the graphics profiles [{notSupportedProfiles}] are supported by the Graphics Device. " +
$"The highest available profile is [{availableGraphicsProfile}].");
}
// Otherwise, there was just no screen mode
throw new InvalidOperationException("No compatible screen mode found");
}
RankDevices(devices);
if (devices.Count == 0)
{
throw new InvalidOperationException("No compatible screen modes found after ranking");
}
return devices[0];
}
/// <summary>
/// Ranks a list of <see cref="GraphicsDeviceInformation"/>s before creating a new Graphics Device.
/// </summary>
/// <param name="foundDevices">A list of possible device configurations to be ranked and reordered.</param>
protected virtual void RankDevices(List<GraphicsDeviceInformation> foundDevices)
{
// Don't sort if there is a single device (mostly for XAML/UWP)
if (foundDevices.Count == 1)
return;
foundDevices.Sort(CompareDeviceInformations);
//
// Compares two `GraphicsDeviceInformation` instances to determine their ranking.View on GitHub (pinned to 96fad776d2)