| Previous | Next |
| STATUS_AUTH_TAG_MISMATCH | STATUS_INVALID_KERNEL_INFO_VERSION |
STATUS_INVALID_STATE_TRANSITION
A valid target state is still invalid when the current state has no transition to it
STATUS_INVALID_STATE_TRANSITION describes a state-machine error. The requested destination state can be valid in the abstract, but the transition from the object's current state is not allowed. This differs from STATUS_REQUEST_OUT_OF_SEQUENCE mainly in diagnostic emphasis: here the state edge itself is invalid, so current and target states are the essential evidence.
Windows driver guidance often publishes lifecycle diagrams or transition rules rather than relying on callers to infer ordering. The PWM controller driver example explicitly states that transitions not described for a state are invalid or not possible and should complete with an appropriate error. RSSv2 guidance likewise requires drivers to track parameters across active and inactive steering states and validate them when a transition makes them active. These contracts illustrate why state must be modeled explicitly.
Log the object generation, current state, requested state, triggering operation, and the last transition that succeeded. Verify transitions under the same lock or serialization primitive that protects the state value; checking a state and changing it later under different synchronization creates a time-of-check/time-of-use race. Do not add an undocumented transition merely because it avoids the error. Either route the operation through the required intermediate state or reject it according to the owning interface.
What to inspect
- Record current state, target state, object generation, and the event that requested the transition.
- Keep transition validation and state mutation under one serialization policy.
- Use documented intermediate states and teardown paths instead of inventing direct edges.
References
- Microsoft: PWM driver state transitions
- Microsoft: Receive Side Scaling Version 2
- Microsoft: PnP and power management scenarios
- Microsoft: Enhanced I/O Verification
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.
