| 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
During a this result investigation, Windows Animation is a stateful COM subsystem. Animation variables, transitions and storyboards are created under a manager, scheduled against a monotonic animation time, updated before drawing, and eventually sealed or released., a visible glitch can therefore be downstream of a lifecycle, ownership, timeline, callback, or numeric contract failure.
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.
The first owner to inspect is the animation manager, storyboard, transition, timer, or callback that returned the HRESULT.
High-value telemetry
| Capture | Diagnostic value |
|---|---|
| Callback interface and method for it. | This provides a stable comparison across retries or another machine and helps test the Windows Animation Manager boundary. |
| Nested API call and stack trace for it. | This identifies the exact object or resource generation involved and helps test the Windows Animation Manager boundary. |
| Manager update depth for it. | This places the failure on the lifecycle or transaction timeline and helps test the Windows Animation Manager boundary. |
| Deferred-work queue ownership for it. | This separates caller input from environment and service state and helps test the Windows Animation Manager boundary. |
Decision table
- Fresh storyboard or animation object: for it, a changed result separates retained object, connection, path, host, or device state from the original input. Hold constant: for it, 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: for it, 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: for it, keep the original this result sample available for the final regression test.
Safe reduction procedure
When it is returned, use a disposable control object, repository copy, file, or device association where the subsystem permits it.
- 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 a it 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
The references below define the API family or storage/protocol behavior used to interpret it.
- Microsoft: Windows Animation error codes
- Microsoft: Windows Animation overview
- Microsoft: Schedule a storyboard
- Microsoft: IUIAnimationManager interface
Looking for a different code? Search another status or error code.