| Previous | Next |
| D2DERR_INVALID_INTERNAL_GRAPH_CONFIGURATION | D2DERR_BITMAP_CANNOT_DRAW |
D2DERR_CYCLIC_GRAPH
The scope of D2DERR_CYCLIC_GRAPH is Direct2D custom-effect transform graphs. The effect image or transform dependencies form a cycle. Keep 0x88990020 beside the returning method because a wrapper can replace this distinction with a generic subsystem message.
What the status establishes
When D2DERR_CYCLIC_GRAPH is returned, a transform graph must have valid node identities, supported input counts, complete input mappings, one reachable output, and no cycles. 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 in the D2DERR_CYCLIC_GRAPH path.
For D2DERR_CYCLIC_GRAPH, inspect the following boundary: edges among effects, command lists, images, and transform nodes.
Keep neighboring failures separate
INVALID_GRAPH_CONFIGURATION is broader; CYCLIC_GRAPH gives the exact acyclic invariant that failed. For D2DERR_CYCLIC_GRAPH, 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.
Build a useful incident record
| Record | Why it matters here |
|---|---|
| Node and image identities | Preserving node and image identities provides the evidence needed to test this distinction: iNVALID_GRAPH_CONFIGURATION is broader; CYCLIC_GRAPH gives the exact acyclic invariant that failed. |
| Edge that closes the cycle | For D2DERR_CYCLIC_GRAPH, recording edge that closes the cycle separates the Direct2D custom-effect transform graphs boundary from a later wrapper symptom. |
| Effect input assignments and target image | In D2DERR_CYCLIC_GRAPH diagnostics, recording effect input assignments and target image ties the HRESULT to the Direct2D custom-effect transform graphs boundary rather than to the final visible failure. |
| Graph generation and reuse history | Comparing graph generation and reuse history shows whether D2DERR_CYCLIC_GRAPH follows input, object state, or environment. |
Reduce the scenario safely
For D2DERR_CYCLIC_GRAPH, build one pass-through node, validate it, and add one node or edge per step. When D2DERR_CYCLIC_GRAPH is returned, log input count, edge endpoints, effect-input mapping, output selection, and topological order before committing the graph.
- When D2DERR_CYCLIC_GRAPH is returned, run cycle detection before SetInput or graph commit.
- Use distinct intermediate images in the D2DERR_CYCLIC_GRAPH path.
- For D2DERR_CYCLIC_GRAPH, build the chain from source toward output.
- When D2DERR_CYCLIC_GRAPH is returned, avoid using the current target as its own upstream input.
Interpret the controls
| Test | Interpretation | Hold constant |
|---|---|---|
| Same environment, reduced input | If D2DERR_CYCLIC_GRAPH disappears with a smaller faithful case, complexity within Direct2D custom-effect transform graphs is implicated. | For D2DERR_CYCLIC_GRAPH, keep node and image identities fixed while simplifying effect input assignments and target image. |
| Same input, fresh object generation | If D2DERR_CYCLIC_GRAPH 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_CYCLIC_GRAPH, place edge that closes the cycle on the timeline of the last successful transition. |
| Same operation on a controlled second path | If D2DERR_CYCLIC_GRAPH follows one environment, the failure is not explained by source data alone. | For D2DERR_CYCLIC_GRAPH, compare adapter and feature level, factory and device generations, target identity, debug-layer output, and thread ownership while preserving graph generation and reuse history. |
Prove the correction
A correction for D2DERR_CYCLIC_GRAPH 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 “Run cycle detection before SetInput or graph commit” and confirm that the following lifecycle step also succeeds. For D2DERR_CYCLIC_GRAPH, keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.
Technical references
When D2DERR_CYCLIC_GRAPH 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.