| 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.
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.
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 | 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 instance | 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
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.
- 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 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.
Technical references
Looking for a different code? Search another status or error code.