Blue screen of death

A blue screen of death (also known as a blue screen, bugcheck, BSOD, or Stop error)Microsoft Docs. Interpreting a Bug Check Code, 20 April 2017. is a common name for the screen that occurs during a system crash in Microsoft Windows operating systems. It is shown when the operating system can no longer function safely due to a fatal system error.
==History==
Contrary to popular belief, Windows 1.0 and Windows 2.x do not have a crash screen. When early Windows is run on a newer version of MS-DOS, it will print out an "Incorrect DOS version" error message, followed by portions of the computer's memory contents being spewed into the console buffer during the boot process, which is often thought to be a crash screen, although it is simply a bug that is present within the logo code. Whenever Windows does crash, it often results in a system hang or the shell returning to DOS.
A user interface for displaying important system messages was first introduced in Windows 3.0 and is mostly used by virtual device drivers in 386 enhanced mode. This is a full screen message in text mode, which suspends Windows until it is dismissed by the user by pressing a key. Initially, it used a black background but later changed to blue with Windows 3.1. Other than this, the interface was kept virtually unchanged through the rest of the classic Windows series.
In Windows 3.x, this is mostly used in situations where a program could not continue running until the user acted, such as device conflicts or disk swaps.Chen, Raymond. Steve Ballmer did not write the text for the blue screen of death, The Old New Thing. 9 September 2014. However, severe system errors would still cause Windows to exit back to MS-DOS in a similar fashion to old Windows versions. The interface is also used for a simple task manager implemented in Windows 3.1, which allows the user to terminate an unresponsive program or to reboot the system by pressing , given that Windows is running in the 386 Enhanced Mode. The message shown when there is an unresponsive program was originally written by Steve Ballmer, as later revealed by Microsoft developer Raymond Chen.Chen, Raymond. Who wrote the text for the Ctrl+Alt+Del dialog in Windows 3.1?, The Old New Thing. 2 September 2014.
Windows 95 and later notably use the user interface to report severe system errors instead of exiting to DOS, which earned it the infamous "blue screen of death" nickname. The Windows 9x series is also unique in that it allows the user to continue after most system errors, although it often resulted in an unstable system.Chen, Raymond. I wrote the original blue screen of death, sort of, The Old New Thing. 10 September 2014. The wording for the exception message was updated with Windows Me as a part of similar changes to other error dialogs.
Other notable uses for the interface also include ACPI subsystem errors in early Windows 98 builds, which override the background color to red, or early builds of Windows Me that briefly replaced the graphical "safe to turn off" screen with a blue screen at one point. Windows Me also replaced MS-DOS black screen errors for startup initialization errors during startup, such as protection errors, with a blue screen.
===Windows NT===
On Windows NT, blue screens are also commonly known as STOP errors, referring to the *** STOP label that introduced the error code up to Windows 7. According to John Vert, the developer who originally wrote the code in the NT kernel that was responsible for controlling the screen in text mode, the white-on-blue color was chosen in order to match the MIPS' firmware display, as well as the default color scheme of the SlickEdit text editor that many NT developers had used at the time.Vert, John. Response to "Who designed the original Windows Blue Screen of Death?" question, Quora. 19 October 2012.
The first known build to implement a blue screen is the October 1991 build. Earlier builds merely print the error code to a debugger, if attached, and trigger a breakpoint in an infinite loop. Originally, a system crash only resulted in the error code being printed out to the screen, although later during Windows NT 3.1 development it was extended to also display the stack trace and a list of loaded drivers and their base addresses, alongside giving the stop codes their names that would be commonly used in documentation.
The message was simplified in Windows 2000 to only include possible instructions for the user should they encounter the blue screen. Additionally, the introduction of a VGA driver in the kernel itself allowed for the blue screen to be displayed in 640×480 graphics mode instead of the legacy 80×50 text mode - although the initial implementation in build 1796 and 1814 featured a bug which caused text to be drawn over a black background or on top of the boot screen graphic. The user instructions were further updated and the font changed to Lucida Console in Windows XP.
During the development of Windows 8, the blue screen underwent many significant changes. Around build 7788, the blue screen was updated to support higher resolutions using VBE 2.0 and anti-aliasing. At first, this updated blue screen only appeared if the system crashed during the boot sequence, although it would later be fully utilized in all bugchecks around the time of build 7880's compilation. It would be quickly replaced with a simplified black screen in build 7887, and later redesigned in build 8045 to additionally feature a sad emoticon. The background color was later changed to a light cerulean shade in build 8061 and then slightly adjusted in later builds of the operating system.
In Windows 10 build 14316, a QR code was added to the blue screen that links to Microsoft's website for diagnosing blue screen errors. From build 14993 onwards, the background color was changed to green for Insider builds together with a slight wording change in order to be able to quickly distinguish between Insider and production build bug reports; although this can be toggled off with the use of a DisplayPreReleaseColor DWORD in the HKLM/SYSTEM/ControlSet001/Control/CrashControl key. In Windows 10 May 2020 Update and above, the message was altered to refer to the user's device as opposed to the user's PC.
The default background color for bug checks was temporarily changed in Windows 11 build 22000.51 to black, although the green color remained for users in the Insider program. The change was later reverted with build 22000.346, albeit with a darker shade of blue. The QR code was dropped in Windows Server build 22463 for a short period and was reinstated afterwards.
==Implementation==
In classic Windows, the blue screen is implemented by the SHELL_SYSMODAL_Message routine in the Shell VxD. The routine temporarily halts the system and then proceeds to tell the display driver to switch the display to text mode. It sets the background and foreground color, clears the screen and displays the message. It then waits for a valid keypress before switching back to graphics mode and resuming operation. On Windows 9x, it is most commonly called from VWIN32_BlueScreenPopup in VWIN32.VXD, which displayed the infamous message about an occurring exception. It is possible to change the color of the screen by changing MessageBackColor (background color) and MessageTextColor (text color) values in SYSTEM.INI (under 386Enh section).
The blue screen on NT-based systems is implemented in the KeBugCheck and KeBugCheckEx functions, which are contained in the kernel executable. The difference between the two functions is that the former accepts only the bugcheck code as an integer parameter, while the latter also accepts four more integers as bugcheck parameter codes, which can have different meaning depending on the bug check code. A component running in kernel mode can call either function to bring the system down in a controlled manner if it detects a fatal uncorrectable error that can lead to data corruption.https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-kebugcheckhttps://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-kebugcheckex The respective function then takes care of switching to a compatible video mode, rendering the blue screen itself, saving a memory dump, and, if enabled, restarting the system. The colors are hardcoded within the kernel but can be changed using a driver such as NotMyFault.Chen, Raymond. How do I customize the color of the Windows blue screen?, The Old New Thing. 1 February 2022.
User mode processes can also trigger a bug check if they hold the shutdown privilege by using the NtRaiseHardError system call in ntdll.dll with the OPTION_SHUTDOWN_SYSTEM flag, which transitions the system to kernel mode and then triggers a FATAL_UNHANDLED_HARD_ERROR bug check.
==Gallery==
===Windows 95 to Windows Me===
Windows95-4.0.122-SystemCrash.png|System crash in Windows 95 build 122
Windows 9x BSOD.png|System crash in Windows 95 and Windows 98
File:2452BSOD.png|System crash in Windows Me build 2452
Windows ME BSOD.png|System crash in Windows Me
===Windows NT 3.1 to Windows NT 4.0===
WindowsNT31-October1991-BSOD.png|System crash in the October 1991 build of Windows NT 3.1
WindowsNT3.1-3.1.340-BSOD.png|System crash in Windows NT 3.1 build 340.1
WindowsNT3.1-BSOD.png|System crash in Windows NT 3.1
WindowsNT35-3.5.782-BSOD.png|System crash in Windows NT 3.5x and Windows NT 4.0
===Windows 2000 to Windows 7===
File:Windows2000-5.0.1796.1-stoperror.png|System crash in Windows 2000 build 1796.1
File:Windows2000-5.0.1848-BSOD.png|System crash in Windows 2000 build 1835.1
File:Win2000BSoD.PNG|System crash in Windows 2000
File:WindowsXP-5.1.2446-SystemCrash.png|System crash in Windows XP build 2446
File:WindowsXP-5.1.2474-SystemCrash.png|System crash in Windows XP build 2474
File:WindowsXP7BSOD.png|System crash from Windows XP till Windows 7
===Windows 8 and later===
File:7880-crash.png|System crash in Windows 8 builds 7791 to 7880
File:Windows8-7887-bsod.png|System crash in Windows 8 build 7887
File:Windows8-6.2.7973-core1-BSOD.png|System crash in Windows 8 builds 7973 to 8032
File:8038 bsod.png|System crash in Windows 8 build 8038 and 8040
File:Windows8-6.2.8056-BSOD.png|System crash in Windows 8 build 8045 to 8056
File:Windows8-6.2.8102-BSOD.png|System crash in Windows 8 build 8061 to 8158
File:8161-BSOD.png|System crash in Windows 8 build 8161
File:Windows8ConPBSOD.png|System crash in Windows 8 build 8250
File:Windows8-RTM-BSOD.png|System crash from Windows 8 till Windows 10 November Update
File:Win10-1607bsod.png|System crash in Windows 10 Anniversary Update till Windows 10 November 2019 Update
File:Win10GSOD.png|System crash in most Insider Preview builds since Windows 10 build 14993
File:Win10v2004BSOD.png|System crash in Windows 10 May 2020 Update till Windows 10 2022 Update
File:Win11 22000 BlackScreenOfDeath.png|System crash from Windows 11 build 22000.51 till Windows 11 build 22000.282
File:Windows11-10.0.22449.1000-BSOD.png|System crash from Windows 11 build 22000.346 and onwards
==== Early system crash ====
Windows8-7887-earlybsod.png|Early system crash in Windows 8 build 7887
Screen Shot 2021-11-24 at 7.42.32 am.png|Early system crash in Windows 8 builds 7973 to 7989
8014 Bugcheck.png|Early system crash in Windows 8 builds 7997 to 8250
Screen Shot 2021-12-16 at 8.09.42 am.png|Early system crash in Windows 8 build 8400 to Windows 10 May 2019 Update
==== Server variants ====
WindowsServer2012-6.2.8250-BSOD.png|System crash in Windows Server 2012 build 8250
WindowsServer2012-RTM-BSOD.png|System crash from Windows Server 2012 till Windows Server 2016 Technical Preview 4
WindowsServer2016-RTM-BSOD.png|System crash from Windows Server 2016 till Windows Server, version 1909
WindowsServerGSOD.png|System crash in most server Insider Preview builds since Windows Server build 16203
WindowsServerVersion2004BSOD.png|System crash in Windows Server, version 2004 till Windows Server 2022
WindowsServerNickel-10.0.22463.1000-BSOD.png|System crash in Windows Server build 22463
WindowsServerNickel-10.0.22509.1000-BSOD.png|System crash in Windows Server build 22509.1000 and later feature updates
== Notes ==
== References ==
Category:Introduced in Windows 3.0