I encountered a strange crash on closing Civilization V. Usually the game closes fine, but on occasion the crash presents as follows:
- I click "Exit to Windows"
- Game closes, desktop shows, but begins flickering
- After a few seconds of flickering, blue screen of death
I did find a workaround and will post as an answer, as I think this issue could potentially affect other DirectX games. For Civ5 specifically, I did come across a compilation thread for troubleshooting other types of crashes.
To verify symptoms, I used BlueScreenView, a visualizer for windows dump files. After running it and selecting Options->Lower Pane Mode->Blue Screen in XP Style, my crash dump looks like this:
Best Answer
The error suggests it's a DirectX crash, but it is not enough to update graphics drivers or confirm that DirectX is up to date. The breakthrough moment came for me when I found this Windows this Windows post explaining the error. The important part is:
And then I remembered that during those occasional crashes, I had walked away from the game. My monitor was set to turn off after 10 minutes, though when I came back the game seemed fine and I continued to play without issues. Later when I exited, the crash occurred.
My workaround is to use a script to set the timeout to "Never" (can also be manually done through Control Panel->Power Options->Turn off the display->Never), and when the game finished, to set it back to 10 minutes:
CivilizationV_DX11_nosleep.bat