back to article Microsoft veteran on how to blue screen your way to better testing

Developers seeking a way of crashing Windows on demand for testing purposes have received a reminder from Microsoft veteran Raymond Chen: NotMyFault is your friend. Chen predates Microsoft's current batch of operating systems, but his advice remains relevant to developers seeking a way of triggering the infamous Windows blue …

  1. Anonymous Coward
    WTF?

    Better testing

    developers seeking a way of triggering the infamous Windows blue screen of death to test how their code will react to the abrupt stop.

    You must be joking.

    As an application developer my responsibility starts and ends with my app. If your shit OS crashes at will then why should I try and handle that in my application? The source of the error isn't my application, it's the underlying OS, or more specifically it's inability to handle problems without taking everything else down with it.

    The only thing I could try and do is make sure the state/data in my app is retained to a point where the user doesn't lose anything critical. If the OS blue screens it's not just my app that's affected.

    Better testing? Maybe Microsoft should try it with their own OS before telling other developers to work around Microsoft's own failures.

    1. Anonymous Coward
      Anonymous Coward

      Re: Better testing

      But what happens to the users work in the event of a sudden power c

      1. Anonymous Coward
        Anonymous Coward

        Re: Better testing

        But what happens to the users work in the event of a sudden power c

        Then you'd need to test it by killing the power.

        A blue screen and a power cut aren't the same thing. You shouldn't be testing them as though they're equivalent events.

        In either case all my application could try and do is make sure the data/state were as intact as possible when things came back up for the user. The point about blue screens though is that they're a fundamental design flaw with Windows where everything can be taken down irrespective of whether your app was at fault. There is a better way and that's proven by the fact other OS don't have that same problem. In 9 years of using a Mac I've never encountered an equivalent error state.

        1. DavidRa

          Re: Better testing

          You said, "There is a better way and that's proven by the fact other OS don't have that same problem."

          Unfortunately you seem to be unaware of the concepts of a UNIX/Linux/BSD/OSX kernel panic, original Mac "bomb" crash, which are all pretty much the same thing.

          Something went wrong and continuing with error checks might corrupt things, so the safest thing to do is "Halt and catch fire". And it's a balancing act. Want stability? It'll cost more and/or be slower. Pick your poison.

        2. AndrueC Silver badge
          Boffin

          Re: Better testing

          Linux and Mac both have an equivalent - Linux has panic and iOS has (or used to) the sad face icon.

          However for the record it's been many years since I've seen a BSOD from a Windows machine. They have been very rare events for me since Vista and from what I remember that turned out to be an errant video driver.

          But it's not all good news. My Windows 10 mail server use to randomly freeze. From looking at the event logs it was mostly moaning about a lack of virtual memory and pointed out that the top few processes were between them consuming a few hundred megabytes. Making it shut down every 24 hours helped a bit but it still did it. When I dug into the logs further I noticed that WSUS was often downloading an update shortly before the freeze. On a hunch I added more RAM taking it from 8GB to 16GB and since then it's been fine. All a bit strange since all it's doing is running a mail server, TVersity and Logitech SqueezeServer.

          Hey ho.

  2. Dan 55 Silver badge
    WTF?

    "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

    What?

    1. phuzz Silver badge
      Stop

      Re: "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

      Yep that sounds, well, wrong.

      PS/2 keyboards were the norm when Windows 1.0 came out, and definitely worked out of the box with Windows 3. They're still supported on Windows 11, if you happen to have a motherboard that has a PS/2 port.

      Win95 could just about handle USB keyboards with additional drivers etc. Win98 was the first version with USB support out of the box. (Although you'd still encounter motherboards which required a PS/2 keyboard to access the BIOS).

      Oh, and Hyper-V was first added to Server 2008 and Win8.

      Have elReg been letting an AI write articles?

      1. I don't know, stop asking me.

        Re: "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

        > PS/2 keyboards were the norm when Windows 1.0 came out

        Windows 1.0 predate the PS/2 keyboard by 2 years.

        DIN 41524 plug keyboards were the prevailing standard in 1985.

      2. diodesign (Written by Reg staff) Silver badge

        :-(

        No, we meant that support for the crash-inducing key combination via PS/2 turned up in Win2K, etc, and what the article now more clearly says.

        And no, we don't use AI to write articles.

        C.

        1. EricB123 Silver badge

          Re: :-(

          It seems to me the vultures at El Reg have been fighting back with comments of their own more frequently these days. Are we the readers getting more abrasive lately?

      3. phuzz Silver badge

        Re: "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

        Clarification

        When I first read the article, it wasn't clear that it was the crash-inducing key combination that was introduced in Win2k (etc.). I used the corrections form, and got a reply from the author, Richard Speed* promising to make it clearer, and then another email from elReg staff also confirming the clarification. The amended article makes it much clearer, always use the Corrections form folks, the take their jobs seriously :)

        Sorry for accusing you of being Ai, elReg :(

        *name checks out ;)

    2. Anonymous Coward
      Boffin

      Re: "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

      I also wondered this.

      I think what it means is that Windows 2000 was released around the time when people started using USB keyboards en masse. So it had to support both PS/2 and USB. In that regard it had specific drivers for PS/2 keyboards https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/ps-2--i8042prt--driver

      Vista was the first OS which "properly" supported USB keyboards out of the box, because by that point they'd become the standard you'd get with a new machine, IIRC.

      Would be good to get clarification from the author.

      1. Wally Dug

        Re: "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

        I don't think the author means that PS/2 keyboard support and USB support were added at that time. I think he means that the ability to create the manual crash with a PS/2 keyboard came with Windows 2000 and with a USB keyboard with Windows Vista. As per the linked article, a special key combination is required - Hold down the rightmost CTRL key, and press the SCROLL LOCK key twice - and this was only added for those keyboards at that time. (A special Registry key needs to be set, then a reboot takes place before this is actually enabled.)

      2. diodesign (Written by Reg staff) Silver badge

        Clarification

        Hi -- yes, we meant that PS/2 support for the key combination was added in Win2K etc. We're not seriously suggesting Win2K was the first Windows to get PS/2 support, and Vista was the first to support USB keyboards.

        Give us some credit!

        C.

        1. Anonymous Coward
          Facepalm

          Re: Clarification

          We're not seriously suggesting Win2K was the first Windows to get PS/2 support, and Vista was the first to support USB keyboards.

          Read this sentence out loud:

          "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

    3. diodesign (Written by Reg staff) Silver badge

      Re: "PS/2 keyboard support turned up in Windows 2000, USB keyboards were added with Vista in 2007"

      Support for the crash-inducing key combination via PS/2 turned up in Win2K, etc, is what we meant, and what the article now more clearly says.

      Don't forget to email corrections@theregister.com if you spot something wrong so we can get things fixed ASAP.

      C.

  3. tiggity Silver badge

    "Please do not use sneaky tricks like terminating critical processes like winlogon.exe,"

    "These failures get reported through the Watson service as a winlogon.exe crash, which creates confusion among the winlogon.exe team as they try to identify the source of a nonexistent bug."

    Well, if there was a guaranteed, way to turn off all telemetry / snooping (and for it to stay off) then that would not be an issue would it....

    Though my work machine seems to quite happily give BSOD (waves at Teams, which is trying its best to be the worst of MS current software in terms of massive resource use coupled with frequent catastrophic failures, though its a crowded field, with VS2022 pushing it hard with the recent releases behaving badly)

  4. ldo

    In Other News ...

    Anybody else notice a whole bunch of old Microsoft docs turning up on Bitsavers? All the way from MS-DOS 1.x up to, so far, Windows CD, NT 4, and Windows 2000. Also older versions of BASIC, Assembler, Fortran, C and C++. Also some books, like Charles Petzold’s “Programming Windows” from 1990.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like