| Previous | Next |
| UI_E_SHUTDOWN_CALLED | UI_E_OBJECT_SEALED |
UI_E_ILLEGAL_REENTRANCY
Within Windows Animation Manager, UI_E_ILLEGAL_REENTRANCY reports that a prohibited animation API call was made from inside a callback. Diagnosis of this result should follow the original owner and generation rather than treating the visible symptom as the cause.
Mechanism behind the code
Windows Animation invokes update, priority, and event handlers while internal state is being traversed. Re-entering a mutating API from a callback can invalidate that traversal; the correct design is to queue work for the outer event loop.
High-value telemetry
- Callback interface and method.
- Nested API call and stack trace.
- Manager update depth.
- Deferred-work queue ownership.
Decision table
- Fresh storyboard or animation object: a changed result separates retained object, connection, path, host, or device state from the original input. Hold constant: keep the timeline, transitions, and manager version fixed.
- Reduced failing operation: If this result follows the reduced step, the rejecting transition is localized. Hold constant: retain callback interface and method and remove only unrelated work.
- Targeted corrective control: Use this as a diagnostic branch rather than a blanket workaround: record the first callback entry and nested call. Hold constant: keep the original failing sample available for the final regression test.
Safe reduction procedure
Use a disposable control object, repository copy, file, or device association where the subsystem permits that safely.
- First: Record the first callback entry and nested call.
- Next: Replace the nested mutation with a posted message or task.
- Then: Keep callback code bounded and nonblocking.
- Finally: Run the deferred operation after the callback and manager update return.
Do not erase the distinction
During an investigation, UI_E_WRONG_THREAD is thread affinity; illegal reentrancy can occur on the correct thread.
Do not solve reentrancy by moving the same nested call to an arbitrary worker thread.
Successful outcome
Verify it with the original scenario, one boundary case, and one deliberate failure; success means the callback returns without mutation and the queued operation succeeds at the next safe event-loop turn.
Technical references
Looking for a different code? Search another status or error code.
