| Previous | Next |
| MILEFFECTSERR_RESERVED | MILEFFECTSERR_EFFECTINMORETHANONEGRAPH |
MILEFFECTSERR_CYCLEDETECTED
MILEFFECTSERR_CYCLEDETECTED identifies a failure in cycle detection in the MIL effect graph. Adding or evaluating a connection would create a cycle in a graph that must remain acyclic. Investigation of this result should preserve the original object generation before cleanup, retry, or fallback creates a secondary result.
Locate the first rejecting layer
Image-effect graphs must remain directed and acyclic so bounds and rendering can be evaluated from sources toward an output. A self-edge is the simplest cycle, but reuse of a downstream group or connector can create a longer dependency loop that is not visible in a flat node list., the closing edge, not merely the set of nodes, is the critical evidence.
Inspect the following boundary: dependency edges among source, child, group, and output nodes.
Evidence that changes the diagnosis
| Record | Why it matters here |
|---|---|
| Effect instance and owning graph or group identity | Preserving effect instance and owning graph or group identity provides the evidence needed to test this distinction: iNVALID_GRAPH_CONFIGURATION in Direct2D is broader; this MIL code specifically identifies a cycle. |
| Connector, input, child, listener, property, or transform involved | Recording connector, input, child, listener, property, or transform involved separates the cycle detection in the MIL effect graph boundary from a later wrapper symptom. |
| Calculated input and output bounds | In this result diagnostics, recording calculated input and output bounds ties the HRESULT to the cycle detection in the MIL effect graph boundary rather than to the final visible failure. |
| Construction sequence and first method returning the HRESULT | Comparing construction sequence and first method returning the HRESULT shows whether this result follows input, object state, or environment. |
Comparison tests
| Test | Interpretation | Hold constant |
|---|---|---|
| Same environment, reduced input | If this result disappears with a smaller faithful case, complexity within cycle detection in the MIL effect graph is implicated. | Keep effect instance and owning graph or group identity fixed while simplifying calculated input and output bounds. |
| Same input, fresh object generation | If it changes after rebuilding state, examine ownership across the effect instance, connector builder, graph owner, listener, and bounds calculator. | Place connector, input, child, listener, property, or transform involved on the timeline of the last successful transition. |
| Same operation on a controlled second path | If it follows one environment, the failure is not explained by source data alone. | Compare visual generation, effect registration, shader profile, rendering tier, and target dimensions while preserving construction sequence and first method returning the HRESULT. |
Controlled reproduction
When it is returned, run a graph traversal before committing each edge and record the discovered path from the proposed destination back to the source. Rebuild the same nodes in topological order to verify that ownership is valid when the cyclic edge is absent.
- Run a depth-first ownership check before committing the new edge.
- rebuild the smallest graph containing only the implicated node and one known input.
- When it is returned, log ownership changes and graph generation numbers.
- Validate the graph before allocating large intermediate resources.
Misleading responses
INVALID_GRAPH_CONFIGURATION in Direct2D is broader; this MIL code specifically identifies a cycle. Do not catch the HRESULT and continue rendering with a partially connected graph; later failures can obscure the invariant that was first violated.
Closure criteria
A correction for it should let the operation at the cycle detection in the MIL effect graph boundary complete repeatedly under the original supported conditions. Repeat the control that begins with “Run a depth-first ownership check before committing the new edge” and confirm that the following lifecycle step also succeeds. Keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.
Technical references
When it is returned, these references define the public API family, object model, or error list used to interpret this status.
- Microsoft Open Specifications: HRESULT values.
- Microsoft: WPF bitmap effects overview.
- Microsoft: PixelShader class.
- Microsoft: Direct2D custom effects.
- Microsoft: ID2D1TransformGraph.
Looking for a different code? Search another status or error code.
