
Per week in the past, we reported on how Home windows 11 resurrected a 20-year-old bug in GTA San Andreas by altering the way it dealt with reminiscence, exposing an outdated flaw within the recreation’s code. It seems Home windows has had its share of quirky, hidden behaviors through the years, and a latest rationalization from a long-time Microsoft engineer highlights one other fascinating historic instance.
Again in 2009, across the time Home windows 7 was launched, members of the Neowin discussion board, and customers elsewhere, started reporting a puzzling subject: the welcome display typically took an unusually very long time, as much as 30 seconds, to vanish after logging in. This delay appeared significantly tied to a selected, easy setting involving a strong colour chosen because the desktop background. A Microsoft Help article later confirmed this subject existed for Home windows 7 and Home windows Server 2008 R2 customers with strong colour backgrounds.
Raymond Chen, a long-time Microsoft engineer and writer of the weblog The Outdated New Factor, lately defined the technical cause behind the odd login delay. In line with Chen, who has used a strong colour background since Home windows 95 to save lots of reminiscence and make bug reporting simpler, the Home windows login course of includes a number of parts loading without delay, just like the taskbar, system providers, desktop icons, and the background. The system waits for all of them to sign they’re prepared. Solely after getting the all-clear, or after 30 seconds go, does the Welcome display fade and the desktop seem.
The rationale for the 30-second delay, Chen explains, was that one among these parts did not ship its “prepared” sign. He illustrates this with a simplified instance of what the code for loading the wallpaper might need appeared like:
InitializeWallpaper()
{
if (wallpaper bitmap outlined)
{
LoadWallpaperBitmap();
}
}
LoadWallpaperBitmap()
{
find the bitmap on disk
load it into reminiscence
paint it on display
Report(WallpaperReady);
}
The essential half, Chen factors out, is that the Report(WallpaperReady)
name was positioned contained in the LoadWallpaperBitmap
perform. This perform solely runs if a “wallpaper bitmap” is outlined. In the event you chosen a strong colour as a substitute of a picture, the LoadWallpaperBitmap
perform was skipped fully, which means the Report(WallpaperReady)
line was by no means executed. The login system saved ready for this sign, which by no means got here, finally hitting its 30-second timeout earlier than continuing to point out the desktop.
Chen notes {that a} related drawback might happen in the event you enabled the “Cover desktop icons” group coverage. This was as a result of the code that reported desktop icons as prepared was doubtless put contained in the conditional examine for that coverage.
// Authentic code
InitializeDesktopIcons()
{
bind to the desktop folder
enumerate the icons
add them to the display
Report(DesktopIconsReady);
}
// Up to date with group coverage assist
InitializeDesktopIcons()
{
if (desktop icons allowed by coverage)
{
bind to the desktop folder
enumerate the icons
add them to the display
Report(DesktopIconsReady);
}
}
If the coverage prevented icons from exhibiting, the report name was skipped there too, resulting in the identical 30-second timeout on the Welcome display. You will need to perceive, Chen emphasizes, that the login course of itself didn’t essentially take an additional 30 seconds to finish all its duties. The Welcome display simply stayed seen for the complete 30-second timeout as a result of one particular element did not report its completion, even when all different components of the login had completed loading a lot sooner.
Because the Microsoft Help article signifies, a hotfix addressing this drawback was launched for Home windows 7 and Home windows Server 2008 R2 in November 2009.
No Comment! Be the first one.