| Previous | Next |
| D2DERR_EXCEEDS_MAX_BITMAP_SIZE | D2DERR_INVALID_INTERNAL_GRAPH_CONFIGURATION |
D2DERR_INVALID_GRAPH_CONFIGURATION
D2DERR_INVALID_GRAPH_CONFIGURATION identifies a failure in Direct2D custom-effect transform graphs. A custom effect transform graph violates a public graph construction rule. Investigation of D2DERR_INVALID_GRAPH_CONFIGURATION should preserve the original object generation before cleanup, retry, or fallback creates a secondary result.
What the status establishes
A transform graph must have valid node identities, supported input counts, complete input mappings, one reachable output, and no cycles in the D2DERR_INVALID_GRAPH_CONFIGURATION path. For D2DERR_INVALID_GRAPH_CONFIGURATION, public graph configuration errors usually point to caller construction; an internal graph error warrants preserving a minimal valid-looking graph and runtime evidence rather than inventing a missing public rule.
For D2DERR_INVALID_GRAPH_CONFIGURATION, inspect the following boundary: nodes, input mapping, output node, connections, and transform input counts.
Build a useful incident record
| Record | Why it matters here |
|---|---|
| All node identities and input counts | In D2DERR_INVALID_GRAPH_CONFIGURATION diagnostics, recording all node identities and input counts ties the HRESULT to the Direct2D custom-effect transform graphs boundary rather than to the final visible failure. |
| Edges and effect-input mappings | Comparing edges and effect-input mappings shows whether D2DERR_INVALID_GRAPH_CONFIGURATION follows input, object state, or environment. |
| Output node and passthrough state | Preserving output node and passthrough state provides the evidence needed to test this distinction: iNVALID_INTERNAL_GRAPH_CONFIGURATION identifies an internal inconsistency; INVALID_GRAPH_CONFIGURATION generally points to the graph supplied by effect code. |
| Initialize or SetGraph sequence | For D2DERR_INVALID_GRAPH_CONFIGURATION, recording Initialize or SetGraph sequence separates the Direct2D custom-effect transform graphs boundary from a later wrapper symptom. |
Interpret the controls
| Test | Interpretation | Hold constant |
|---|---|---|
| Same environment, reduced input | If D2DERR_INVALID_GRAPH_CONFIGURATION disappears with a smaller faithful case, complexity within Direct2D custom-effect transform graphs is implicated. | For D2DERR_INVALID_GRAPH_CONFIGURATION, keep all node identities and input counts fixed while simplifying output node and passthrough state. |
| Same input, fresh object generation | If D2DERR_INVALID_GRAPH_CONFIGURATION changes after rebuilding state, examine ownership across the caller’s object graph, custom effect or renderer, Direct2D validation layer, backing device, and deferred draw boundary. | For D2DERR_INVALID_GRAPH_CONFIGURATION, place edges and effect-input mappings on the timeline of the last successful transition. |
| Same operation on a controlled second path | If D2DERR_INVALID_GRAPH_CONFIGURATION follows one environment, the failure is not explained by source data alone. | For D2DERR_INVALID_GRAPH_CONFIGURATION, compare adapter and feature level, factory and device generations, target identity, debug-layer output, and thread ownership while preserving Initialize or SetGraph sequence. |
Reduce the scenario safely
When D2DERR_INVALID_GRAPH_CONFIGURATION is returned, build one pass-through node, validate it, and add one node or edge per step. Log input count, edge endpoints, effect-input mapping, output selection, and topological order before committing the graph in the D2DERR_INVALID_GRAPH_CONFIGURATION path.
- Build a one-node pass-through graph in the D2DERR_INVALID_GRAPH_CONFIGURATION path.
- For D2DERR_INVALID_GRAPH_CONFIGURATION, add nodes and edges incrementally.
- When D2DERR_INVALID_GRAPH_CONFIGURATION is returned, ensure each required effect input maps once.
- Set one reachable output node in the D2DERR_INVALID_GRAPH_CONFIGURATION path.
Keep neighboring failures separate
INVALID_INTERNAL_GRAPH_CONFIGURATION identifies an internal inconsistency; INVALID_GRAPH_CONFIGURATION generally points to the graph supplied by effect code. For D2DERR_INVALID_GRAPH_CONFIGURATION, do not respond with a universal render-target recreation loop unless the returned status specifically documents device-loss recovery; graph, property, numeric, lifetime, and print-state errors require correcting their contract.
Prove the correction
A correction for D2DERR_INVALID_GRAPH_CONFIGURATION should let the operation at the Direct2D custom-effect transform graphs boundary complete repeatedly under the original supported conditions. Repeat the control that begins with “Build a one-node pass-through graph” and confirm that the following lifecycle step also succeeds. For D2DERR_INVALID_GRAPH_CONFIGURATION, keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.
Technical references
When D2DERR_INVALID_GRAPH_CONFIGURATION is returned, these references define the public API family, object model, or error list used to interpret this status.
- Microsoft: Direct2D error codes.
- Microsoft: Direct2D custom effects.
- Microsoft: ID2D1TransformGraph.
- Microsoft: Direct2D effect properties.
Looking for a different code? Search another status or error code.