What causes the Windows XP lagscreen render fail?

7

2

We all know the situation when a program or the OS itself froze and the only thing you can do is paint with the millions of dialogs that the system renders. I am talking about this (demo here):

Windows lagscreen

Why does this happen? And why do I always meet with it only on Windows XP? Doesn't this occur on Linux, Mac or other Windows versions? If not, why? Actually, does this bug has an official/common name at all?

totymedli

Posted 2013-08-08T23:16:56.927

Reputation: 4 004

Happened to me with X11 today. :) – phil294 – 2018-05-20T08:02:04.953

Answers

6

That is called a “ghost window”. What happens is that the process hangs or gets deadlocked and thus cannot respond to the paint message to update its window. To handle this situation, Windows takes over and paints the window until the program becomes responsive again and paints itself (or is killed or crashes).

In older versions of Windows, a frozen window was painted solid with its background color, but in XP, Windows takes a screenshot of the window as it was the last time it was updated, and uses that to paint it. Of course if parts of the window are covered (like if you drag it offscreen), then Windows can only paint it with the background color (which is why after dragging it offscreen in all directions, it ends up completely blank).

In addition, when you drag other windows over it, they leave a trace behind because the frozen window does not respond to the paint message when part of it is uncovered.

In Vista+, Windows still paints ghost windows like in XP, but it uses a trick to make the window seem like it is still alive to some degree; you can still move and minimize it without losing the last-updated image or getting the hall-of-mirrors effect. What it does now is to hide the actual frozen window, and replace it with a new, temporary window that is made in the same size and shape as the frozen one. The new window is painted with a screenshot of the frozen window, but with a pale white-wash. Now, when you drag other windows over it, it retains the original (ghosted) image because it is not actually frozen; it processes the paint message by painting the stored screenshot.

Microsoft employees Raymond Chen and Matt Eason covered it well.

Of course Mac, Linux, etc. all handle window drawing and management in their own ways, so they respond to frozen windows in different ways.

Synetech

Posted 2013-08-08T23:16:56.927

Reputation: 63 242

1

For the record, you will be please guys to know that Mac OS X 10.9 aka Mavericks now include this feature : http://d.pr/i/Pe4U+

– Gregoire D. – 2013-10-10T13:03:00.690