CRITICAL_PROCESS_DIED at shutdown and restart
Expected behavior
Shutdown and restart properly
Observed behavior
CRITICAL_PROCESS_DIED kernel panic occurs at shutdown and restart.
Steps to reproduce
- Enable 'Encryption of key and passwords stored in RAMKeys encryption' or 'VeraCryptEraseKeysShutdown' or both of them.
- Shutdown or restart
- After shutdown when CPU fan already stop spinning and screens are black, kernel panic occurs. It also occurs right before restarting the PC.
- No minidump is generated
Screenshots

Your Environment
Dell Latitude E5450 + Dell Advanced E-Port II, 16GB of RAM Please tell us more about your environment
VeraCrypt version: VeraCrypt 1.25.9 Operating system and version: Windows 11 System type: 64-bit
My computer had the same issue before. Here is what my computer current has: - Wiped cached passwords on exit, Wiped cached passwords on auto-dismount for my general settings and I've also had the activation encryption of keys and passwords stored in RAM as well as VeraCryptEraseKeysShutdown enabled. Those were the settings that I had before the issue has occurred. I am not sure if you are using a HDD or SSD, but I am using an HDD with AES encryption to allow full disk encryption.
Also, I've just checked my PC settings, it appears that I have "System managed size" selected on the Performance Options -> Virtual Memory. Not sure if that helps. Also, I've disabled memory dumps.
I have seen your issue. That is why I checked all possible scenarios and posted results. I don't like the fact I need to disable both 'Encryption of key and passwords stored in RAMKeys encryption' and 'VeraCryptEraseKeysShutdown' to prevent kernel panic at shutdown. Also, BSOD ocurs right before switching to G2 state, so it is to late to generate dumps
I've found this blue screen error sometimes, not consistently, on an external Windows 1607 Windows to go hard drive. Maybe Veracrypt is unmounting the drive while some other process still needs to use it.
I had system on GPT partition, secure boot was disabled and legacy mode was enabled (allowed, but not default).
With legacy mode disabled and secure boot enabled I haven't seen BSOD anymore. I am running Windows 11 now and have both RAMkeys encryption and EraseKeysAtShutdown enabled.