Larry Osterman's WebLog

Confessions of an Old Fogey
Blog - Title

Wait, that was MY bug? Ouch!

Wait, that was MY bug? Ouch!

Over the weekend, the wires were full with reports of a speech recognition demo at the Microsoft's Financial Analysts Meeting here in Seattle that went horribly wrong. 

Slashdot had it, Neowin had it,  Digg had it, Reuters had it.  It was everywhere.

And it was all my fault.


Well, mostly.  Rob Chambers on the speech team has already written about this, here's the same problem from my side of the fence.

About a month ago (more-or-less), we got some reports from an IHV that sometimes when they set the volume on a capture stream the actual volume would go crazy (crazy, for those that don't know, is a technical term).  Since volume is one of the areas in the audio subsystem that I own, the bug landed on my plate.  At the time, I was overloaded with bugs, so another of the developers on the audio team took over the investigation and root caused the bug fairly quickly.  The annoying thing about it was that the bug wasn't reproducible - every time he stepped through the code in the debugger, it worked perfectly, but it kept failing when run without any traces.


If you've worked with analog audio, it's pretty clear what's happening here - there's a timing issue that is causing a positive feedback loop that resulted from a signal being fed back into an amplifier.

It turns out that one of the common causes of feedback loops in software is a concurrency issue with notifications - a notification is received with new data, which updates a value, updating the value causes a new notification to be generated, which updates a value, updating the value causes a new notification, and so-on...

The code actually handled most of the feedback cases involving notifications, but there were two lower level bugs that complicated things.  The first bug was that there was an incorrect calculation that occurred when handling one of the values in the notification, and the second was that there was a concurrency issue - a member variable that should have been protected wasn't (I'm simplifying what actually happened, but this suffices). 


As a consequence of these two very subtle low level bugs, the speech recognition engine wasn't able to correctly control the gain on the microphone, when it did, it hit the notification feedback loop, which caused the microphone to clip, which meant that the samples being received by the speech recognition engine weren't accurate.

There were other contributing factors to the problem (the bug was fixed on more recent Vista builds than the one they were using for the demo, there were some issues with way the speech recognition engine had been "trained", etc), but it doesn't matter - the problem wouldn't have been nearly as significant.

Mea Culpa.

  • @Norman Diamond
    Yes! They sre like that.

    What would you say about perfectly reproducible bug in IE7 that causes all other apps and even Windows itself crash/hung/become totally unusable? (When doing things as simple as opening new tab).

    Microsoft thinks that it's "By Design". Now I finally have proof that MS products are designed to crash everything.

    And why you people ignore Norman Diamond? Does his truth feel too painful?
  • The bottom line is MS has 5 years for this kind of stuff and they cram it in at the last minute.

    Poor planning.

    Vista is buggy and no where near ready.

    This problem is a symptom of a MUCH larger problem.

    Vista ETA: Summer 2007.

    Vista Stable release: 2010.

    Without WinFS Vista is nothing anyway.

    it's like a big security upgrade (10 years overdue).
  • PingBack from
  • Dont be dishearted, keep going, you cant acually judge what you have done untill you are finished and you stand back and watch, but then again, technology is never "finished" it is ever expanding...
  • PingBack from
  • I'm not all too sure how this became a Microsoft bashing blog, but I must say that Mac voice recognition is not nearly as capable as Vista's is. Mac's are not required to function with a vast array of software and still easily perform in unknown platform areas.

    I must also defend Microsoft on the "charges" of stealing Apple ideas and so forth, the reality is that you really can't avoid doing the same thing others are doing in the software business, when your consumers want something you have to deliver. And I have to say, when your consumer base is between 60-80% of all persons living, then you can never say no. Simple as that.

    Mac users may also benefit from doing some research, as many items that they claim MS stole from Apple are actually a microsoft first.

    Windows Sidebar (dock) - Primitive version on Windows 95 (or was it 98?)

    Fast app switching - Windows 95

    Voice recognition - PC Compatible software (non-mac)

    And generally, if you want to fight over who had begun to make their OS sleek first, it's a definite win by MS. (windows 95 was one hell of a makeover)
  • Microsoft doesn't know how real people experience these kind of bugs several times a day.  Bill should make a few less billion and pay to fix the problems.  Mac commercial can't be answered because they are true.  MS stopped trying to be better because they are the "most popular OS in the world."  Sounds a lot like Big Blue twenty years eariler...

    Google-type web based programs seem like the future so Bill can lose a couple of billion now or lose it all in ten years.  My computer reports the same bugs to MS each week but MS never fix them.
  • From my son, Joseph, speech recognition the Vista way... And for those who think I take delight in bashing Microsoft, here's a follow-up video that shows the demo wasn't really as bad as it seemed. It was worse... Seriously, though,...
  • Here is some really good news.

    Yesterday Vista build 5472 proved itself more powerful than Windows 95 and more powerful than some observations in Windows 98 and Windows 2000.  Instead of destroying the contents of one or two partitions on external hard drives (or in the case of Windows 98 deleting the wrong logical drive in the extended partition), Vista destroyed the entire contents of an internal hard drive.  Right down to the MBR no longer having its signature, and not having any partitions on it after being re-signed.  On a different physical drive internal to the same machine I have Windows 2000 SP4 with the registry key to recognize 48-bit LBA so it could also show the partitions when they used to exist, it agreed with the Vista DVD's repair console about the fact that the partition table was gone, and it could re-sign the MBR but still not bring back the partition table.

    Now, here is why that is good news.

    Windows Media Centre crashed three times.  Two of those times it yielded Vista's equivalent of BSODs, though the BSOD text wasn't visible.  After the last time, that is when Vista wouldn't reboot, the booter told me to try to do a repair, and the repair tool in the Vista DVD failed.

    Therefore this problem results in the user not being able to use Windows Media Centre for its intended purpose.  Therefore Microsoft might rate it as a must-fix.  Maybe.  Let's hope.

    If it were just deleting the entire hard drive including deleting the Vista installation without Windows Media Centre having been installed, it would have rated its usual zero.
  • Saturday, August 05, 2006 7:09 PM by Will Parker

    > When I was a tester at Microsoft (Yay, MacBU!), a bug of
    > this severity would have been call a 'Pri 2' - the app didn't
    > actually crash, but the user couldn't precede with their
    > planned tasks. In most cases, Pri 2 bugs are accorded 'Must
    > Fix' status unless the repro steps are deemed quite unlikely.

    Well, you'll be glad to know that Pri 2 is still Pri 2.

    When Vista build 5472 deletes the entire contents of an internal SATA hard disk including the Vista installation itself, that must be a Pri 1.  It takes priority over Pri 2.  So it no longer matters that the user of Windows Media Centre can't proceed with their planned tasks.  Even this Pri 2 collateral damage isn't enough to gain a "must fix" or "might fix" or "find permission to consider fixing".  Deletion of an entire hard drive is a "must not fix", Pri 1.

    Closed without explanation.  But who needs an explanation.  Microsoft is still Microsoft.  The only question is, why, after all these years, do I still find it so hard to believe.  I'm still not cynical enough.
  • a good speech recognition tool for you!

    Real-time conversion of speech to text! Dictation 2005 brings you the combined power of several top-quality speech-recognition tools.
  • Larry Osterman (ya, the same Larry Osterman that got bit by the Audio bug) has a great post on why XGL...
  • Larry Osterman (ya, the same Larry Osterman that got bit by the Audio bug ) has a great post on why XGL
  • You've no doubt heard about the Microsoft Financial Analyst Meeting two weeks ago where a demonstration

  • PingBack from

Page 5 of 7 (100 items) «34567