| Previous | Next |
| ERROR_GRAPHICS_INVALID_VISIBLEREGION_SIZE | ERROR_GRAPHICS_INVALID_PIXELFORMAT |
ERROR_GRAPHICS_INVALID_STRIDE
Interpret the result in its owning layer: graphics invalid stride
ERROR_GRAPHICS_INVALID_STRIDE (0xC026233C) belongs to the vidpn layer. It marks the primary surface stride violates format, width, alignment or driver constraints, rather than a generic rendering failure. The object that owns the decision is source-mode scanline pitch.
Recalculate pitch from format and alignment
Stride is measured in bytes between adjacent scanlines and may exceed width multiplied by bytes per pixel because the driver requires alignment. Capture width, format, bits per pixel, allocation pitch and any private-format metadata from the same device. Build the control surface through the runtime so its pitch is authoritative. Never copy a pitch from another adapter, resource generation or rotated layout into the candidate source mode.
Capture before recreating objects
| Capture item | Why it matters |
|---|---|
| Current graph state | VidPN, topology, source and target mode sets, and the present path connecting them |
| Supporting trace | source and target IDs, topology generation, path descriptors, pinned modes, mode-set handles and monitor timing data |
| Object identity | source-mode scanline pitch |
| Rejected condition | the primary surface stride violates format, width, alignment or driver constraints |
| What to capture | stride in bytes, width, pixel format, bits per pixel, alignment and private-format metadata |
Reproduce one variable at a time
- Capture the failing state. Record stride in bytes, width, pixel format, bits per pixel, alignment and private-format metadata.
- Derive the minimum aligned pitch for the same width and format and retry.
The comparison with ERROR_GRAPHICS_INVALID_PIXELFORMAT is especially useful: ERROR_GRAPHICS_INVALID_PIXELFORMAT rejects the format itself rather than its memory pitch.
Recovery contract
Use the runtime or driver-required pitch calculation instead of assuming width times bytes per pixel.
- debug-layer, ETW or driver diagnostics no longer report the rejected source-mode scanline pitch contract during the same scenario.
Implementation notes
Log source and target IDs, topology generation, path descriptors, pinned modes, mode-set handles and monitor timing data.
A production fallback should be explicit: pause rendering, re-enumerate, rebuild one cache entry, recreate a device, or decline a protected path only when this layer calls for that action. Reinstalling every display component, deleting all caches or forcing a resolution change is not an evidence-based fix.
Technical references
- Microsoft: Introduction to Video Present Networks — background for the source-mode scanline pitch.
- Microsoft: VidPN objects and interfaces
- Microsoft: Enumerating cofunctional VidPN modes
- Microsoft: Determining VidPN support
Looking for a different code? Search another status or error code.