| Previous | Next |
| CRITICAL_SERVICE_FAILED | HAL_INITIALIZATION_FAILED |
SET_ENV_VAR_FAILED
Startup environment-variable setup failure for SET_ENV_VAR_FAILED
SET_ENV_VAR_FAILED is bug check code 0x0000005B. This historical initialization bug check indicates that the kernel or session startup path failed while building required environment state. It is not the same as an application failing to set a user environment variable after logon.
How to read it in a dump
- Check the boot phase and the process/session context in the dump.
- The nested status code, if present, is more important than the symbolic name.
- Registry hive corruption, memory pressure, or early subsystem failure can be the underlying cause.
What to check
- Inspect system hive and session-manager related errors in boot logs.
- Check whether the failure followed an OS update, security product change, or registry modification.
- Collect a kernel or full dump because small dumps may not contain enough startup state.
References
Dump evidence
Preserve the complete dump, the four bug-check parameters, the exact Windows build, loaded-module list, and the event timeline immediately before the stop. AllStat summarizes the condition as “this result”; that sentence identifies the failure class, while the parameters and stack determine which object, driver, processor, or subsystem instance was involved.
Analysis order
- Run WinDbg
!analyze -v, then inspect the documented meaning of each parameter instead of relying only on the probably-caused-by line. - find the earliest abnormal event: driver update, firmware change, device reset, storage error, verifier report, resource exhaustion, or application hang connected with set / env / var.
- keep third-party filter, security, storage, graphics, and virtualization drivers in the module inventory; removing evidence before dump analysis can obscure the responsible path.
Do not repeatedly reboot a machine affected by this result before collecting the dump and event logs. Recovery actions should follow the component identified by the stack and parameters, not merely the symbolic stop-code name.
Looking for a different code? Search another status or error code.
