One minute you're working hard on your latest PC project. The next, your screen turns blue, a cryptic error message appears and your system reboots, losing everything you hadn't saved. You've been hit by a Blue Screen Of Death (BSOD), the most infuriating of Windows errors. With any luck it's just a one-off, but if this keeps happening then you'll want to find out why.
The most likely cause of blue screen crashes is a buggy driver or Windows service. Uninstalling or updating this will fix the problem, but you'll need to identify the dodgy file first. Here's what to try first.
1. Read the message
By default ,Windows automatically reboots after a BSOD. This is a very bad idea as you may not have time to read the message. To turn this off, right-click (My) Computer and select Properties > Advanced System Settings > Startup and Recovery Settings. Make sure "Write an event to the system log" is checked, but clear the "Automatically restart" box. Click OK.
Now, the next time you experience a BSOD, take the time to read the error message. It can often be very helpful. The message might name a particular file as the culprit, for instance. This information isn't always correct, but it at least gives you a starting point. If you recognise the file as belonging to one of your applications then try removing or updating it. Otherwise, enter the file name and a keyword like 'crash' into a search engine to see what comes up.
Sometimes Windows won't provide a file name, but you will still see the type of error that's occurred. This is displayed both as a name, like 'DRIVER_IRQL_NOT_LESS_OR_EQUAL' and a Stop Code such as 0x000000D1 (conventionally leading zeros are ignored so this would be called Stop Code D1). Aumha and Gateway have helpful articles on stop codes in general, and you can enter the stop code and other details about the error at Google for more specific advice.
2. Check the event log
Click Start (then Run if you're using Windows XP), type eventvwr.msc and press [Enter] to launch the Event Viewer. Click on the System log and look for messages marked 'Warning' or 'Error' from around the time of the crash. Explore the application log, too. Windows often records errors here that you won't see elsewhere, and there could be something that offers a clue about why your system is so unstable.
3. Get professional help
Windows can log crashes as they happen, and sometimes tell you what's causing them, but this will only happen if you turn the feature on. In Windows XP, right-click My Computer, select Properties > Advanced > Error Reporting, select Enable Error Reporting and check both the Windows Operating System and Programs boxes. And in Windows Vista, click Control Panel > System and Maintenance > Problems Reports and Solutions > Change Settings and make sure 'Check for solutions automatically' is selected.
If you're running Windows Vista then it's also worth asking the system to check for new answers to problems you've experienced before. Click Control Panel > System and Maintenance > Problems Reports and Solutions > Check for new solutions and wait for the results.
4. Try the Windows debugger
Even Windows Vista won't always tell you which driver it suspects is behind your crashes. But Microsoft do provide a tool that'll give you the full picture: the Windows debugger. This has a reputation for being complicated, but don't worry - extracting basic crash information from it is really very easy.
First check that you're set up to create crash dump files correctly. Right-click (My) Computer, select Properties > (Advanced) System Settings > Startup and Recovery Settings and make sure Write Debugging Information is set to Kernel Memory Dump.
Now grab the correct Debugging Tools for your version of Windows. Run the downloaded package to install it.
The debugger will download data called symbols to help diagnose your crashes. Create a folder like c:\symbols where these can be stored.
Click Start > All Programs > Debugging Tools for Windows > WinDbg to launch the debugger (Windows Vista users must right-click the WinDbg link and select Run As Administrator).
Click File > Symbol File Path, type SRV*c:\symbols*http://msdl.microsoft.com/download/symbols (replacing c:\symbols with the folder created on your system) in the Symbol Path box and click OK.
You've now finished the set-up process. In future, any time you want to diagnose a crash, all you have to do is launch WinDbg, click File > Open Crash Dump, and point the debugger at the dump file created by your latest crash (this is a file with a .DMP extension, probably Memory.dmp, stored in the Windows or Windows\MiniDmp folder). The debugger will open the file and analyse it, which could take some time - be patient.
If you're in luck then it will identify the file for you with a line like 'Probably caused by : filename.sys'. This information isn't always correct, so treat it as an indicator only. If it points to a firewall you installed a month ago, say, then treat the report seriously, uninstall or upgrade it. But if it names a core Windows component, or an application you've never had any problem with before, then be more sceptical. Search at Google for more reports of crashes with that file before you take any serious action.
5. Other ideas
If even the debugger can't help then it's time to try more general measures.
Simplify your system by unplugging and removing all unnecessary hardware, for instance.
Browse the Start > All Programs menu and uninstall any applications you don't use any more.
Click Start (then Run if you're using Windows XP) and enter devmgmt.msc to launch Device Manager. If this detects a problem device then it will be highlighted with a yellow exclamation mark. These could be another symptom of the problem behind your Windows crashes, so double-click any highlighted devices for more clues.
Check that you're using the latest version of every program you've decided to keep (use UpdateStar at www.updatestar.com to instantly locate these updates for you).
If you're running short of hard drive space then use the Windows Disk Cleanup applet (Start > All Programs > Accessories > System Tools) to create a little room.
And if you have very little RAM - 1GB or less on a Windows Vista PC, say - then try adding more. It's ludicrously cheap, starting at £10 for a 1GB DIMM, and can make a huge difference to your system.