Microsoft veteran's worst Windows bug was Pinball running at 5,000 FPS

Dev admits the game once ate an entire CPU core

Former Microsoft engineer Dave Plummer has come clean and admitted that the worst bug he ever shipped was in... Pinball.

Alongside Task Manager, the game is one of the Windows components for which Plummer is best known, even though Windows XP was the last client release to include it. He ported the original game to Windows NT, converting chunks of assembly into C. He wrote an engine around the original code to deal with video and sound, and that's where the problem lay.

"My game engine had a bug," Plummer admitted on his Dave's Attic channel, "in that it would just draw frames as fast as it could."

This wasn't much of an issue on the hardware of the day. Plummer was using a MIPS R4000 at the time, a mighty beast running at 200 MHz, but it became a problem as hardware improved.

"If I was having a good day," recalled Plummer, "it would run at 60 to 90 frames per second. And I figured that's plenty for a game like that."

However, a few years later, one of Plummer's design choices made itself known. The game would hog an entire CPU core in order to draw its frames as fast as it possibly could. "It was now drawing at, like, 5,000 frames per second because machines were much, much faster."

It was another veteran Microsoft engineer, Raymond Chen, who tracked down the bug. In an interview on the Dave's Garage channel, Chen recalled locating the problem. Why was Pinball using so much CPU? "I realized it had no frame limiter", he said. "It just rendered frames as fast as it could."

Chen found some debug code to show the frame rate, which threw up three asterisks. Computers were now so fast that the frame rate exceeded three digits.

Adding a frame rate limiter meant the CPU usage plummeted. Chen set it to 100 frames per second, and the CPU usage dropped to approximately one percent.

"My proudest moment in Windows development," said Chen, "was I fixed Pinball so you could kick off a build and play Pinball at the same time."

That said, Plummer also noted that having a bug in production code was never a laughing matter. "That was kind of a shameful thing," he said. If true, there must be plenty of shamefaced Microsoft engineers around these days, considering the quality of recent updates.

A bug in the daily builds, though? Something that actually broke the build? "People were merciless," recalled Plummer. He remembered Windows legend Dave Cutler firing off a comment when some horrible code was checked in, suggesting that the author might have had a few adult beverages.

"It was all fun and games until you shipped it. And then it was really serious." ®

More about

TIP US OFF

Send us news


Other stories you might like