| 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 MILEFFECTSERR_CYCLEDETECTED 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 in the MILEFFECTSERR_CYCLEDETECTED path. For MILEFFECTSERR_CYCLEDETECTED, 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. When MILEFFECTSERR_CYCLEDETECTED is returned, the closing edge, not merely the set of nodes, is the critical evidence.
For MILEFFECTSERR_CYCLEDETECTED, 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 | For MILEFFECTSERR_CYCLEDETECTED, 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 MILEFFECTSERR_CYCLEDETECTED 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 MILEFFECTSERR_CYCLEDETECTED follows input, object state, or environment. |
Comparison tests
| Test | Interpretation | Hold constant |
|---|---|---|
| Same environment, reduced input | If MILEFFECTSERR_CYCLEDETECTED disappears with a smaller faithful case, complexity within cycle detection in the MIL effect graph is implicated. | For MILEFFECTSERR_CYCLEDETECTED, keep effect instance and owning graph or group identity fixed while simplifying calculated input and output bounds. |
| Same input, fresh object generation | If MILEFFECTSERR_CYCLEDETECTED changes after rebuilding state, examine ownership across the effect instance, connector builder, graph owner, listener, and bounds calculator. | For MILEFFECTSERR_CYCLEDETECTED, 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 MILEFFECTSERR_CYCLEDETECTED follows one environment, the failure is not explained by source data alone. | For MILEFFECTSERR_CYCLEDETECTED, 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 MILEFFECTSERR_CYCLEDETECTED 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 in the MILEFFECTSERR_CYCLEDETECTED path.
- Run a depth-first ownership check before committing the new edge in the MILEFFECTSERR_CYCLEDETECTED path.
- For MILEFFECTSERR_CYCLEDETECTED, rebuild the smallest graph containing only the implicated node and one known input.
- When MILEFFECTSERR_CYCLEDETECTED is returned, log ownership changes and graph generation numbers.
- Validate the graph before allocating large intermediate resources in the MILEFFECTSERR_CYCLEDETECTED path.
Misleading responses
INVALID_GRAPH_CONFIGURATION in Direct2D is broader; this MIL code specifically identifies a cycle. For MILEFFECTSERR_CYCLEDETECTED, 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 MILEFFECTSERR_CYCLEDETECTED 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. For MILEFFECTSERR_CYCLEDETECTED, keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.
Technical references
When MILEFFECTSERR_CYCLEDETECTED 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.