Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download - Clean, repair and optimize your system



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner 2009 - Free Scan Now

Does Vista treat Not Responding windows special?

microsoft.public.windows.vista.general




Recommended Fix - Fix Vista Errors and Optimize Performance

Click On Your Flag for Translation
Simplified Chinese French Spanish Italian Portugeuse Japanese German Dutch
Driver Scanner 2009 - Free Scan Now
Reply
  #1 (permalink)  
Old 03-01-2007
Kevin
 

Posts: n/a
Does Vista treat Not Responding windows special?
Hello,

I am working on a problem where an application becomes "Not Responding",
because it does not process window messages in a message loop properly.

Does Windows Vista treat "Not Responding" windows specially? It would
explain why screen updates do not occur, whereas they do occur on XP / 2000
/ 9x.

I thought I read something to that effect, but can not find the reference.

Thanks.






Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-01-2007
Skywing [MVP]
 

Posts: n/a
Re: Does Vista treat Not Responding windows special?
The shell will hide the `broken' window and substitute a `ghost' window with
similar characteristics that is moveable and responds to messages. If the
program wakes back up, the `ghost' window is removed and the real window is
moved/sized according to what the user did with the `ghost' window.

This is similar to Windows XP and Windows Server 2003.

If you have attached to a process with a debugger, the behavior of creating
`ghost' windows is suppressed for the process being debugged so long as the
debugger remains attached.

--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net
"Kevin" <kevin11@hutmail.org> wrote in message
news:Oj8W8%23%23SHHA.3980@TK2MSFTNGP02.phx.gbl...
> Hello,
>
> I am working on a problem where an application becomes "Not Responding",
> because it does not process window messages in a message loop properly.
>
> Does Windows Vista treat "Not Responding" windows specially? It would
> explain why screen updates do not occur, whereas they do occur on XP /
> 2000 / 9x.
>
> I thought I read something to that effect, but can not find the reference.
>
> Thanks.
>
>
>
>
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2007
Kevin
 

Posts: n/a
Re: Does Vista treat Not Responding windows special?
Thank you for the information! The problem report indicated Vista-only, but
that must have been an oversight. .

I will respond to the report by saying that the observed behavior is as
expected, that because the app is not processing messages, the window is not
updated because it has been replaced by a "ghost" window.

And thanks for the information pertaining to the debugger. Naturally, I was
running the program under a debugger, and so it is good to know when doing
so alters behavior!!

Thanks again!!


"Skywing [MVP]" <skywing_NO_SPAM_@valhallalegends.com> wrote in message
news:Oi1GwbATHHA.3948@TK2MSFTNGP05.phx.gbl...
> The shell will hide the `broken' window and substitute a `ghost' window
> with similar characteristics that is moveable and responds to messages.
> If the program wakes back up, the `ghost' window is removed and the real
> window is moved/sized according to what the user did with the `ghost'
> window.
>
> This is similar to Windows XP and Windows Server 2003.
>
> If you have attached to a process with a debugger, the behavior of
> creating `ghost' windows is suppressed for the process being debugged so
> long as the debugger remains attached.
>
> --
> Ken Johnson (Skywing)
> Windows SDK MVP
> http://www.nynaeve.net
> "Kevin" <kevin11@hutmail.org> wrote in message
> news:Oj8W8%23%23SHHA.3980@TK2MSFTNGP02.phx.gbl...
>> Hello,
>>
>> I am working on a problem where an application becomes "Not Responding",
>> because it does not process window messages in a message loop properly.
>>
>> Does Windows Vista treat "Not Responding" windows specially? It would
>> explain why screen updates do not occur, whereas they do occur on XP /
>> 2000 / 9x.
>>
>> I thought I read something to that effect, but can not find the
>> reference.
>>
>> Thanks.
>>
>>
>>
>>
>>
>>

>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-16-2007
helpdesk@finofix.nl
 

Posts: n/a
Re: Does Vista treat Not Responding windows special?
On Feb 9, 5:58 am, "Skywing [MVP]"
<skywing_NO_SP...@valhallalegends.com> wrote:
> The shell will hide the `broken' window and substitute a `ghost' window with
> similar characteristics that is moveable and responds to messages. If the
> program wakes back up, the `ghost' window is removed and the real window is
> moved/sized according to what the user did with the `ghost' window.
>
> This is similar to Windows XP and Windows Server 2003.
>
> If you have attached to a process with a debugger, the behavior of creating
> `ghost' windows is suppressed for the process being debugged so long as the
> debugger remains attached.
>
> --
> Ken Johnson (Skywing)
> Windows SDK MVPhttp://www.nynaeve.net"Kevin" <kevi...@hutmail.org> wrote in message
>
> news:Oj8W8%23%23SHHA.3980@TK2MSFTNGP02.phx.gbl...> Hello,
>
> > I am working on a problem where an application becomes "Not Responding",
> > because it does not process window messages in a message loop properly.

>
> > Does Windows Vista treat "Not Responding" windows specially? It would
> > explain why screen updates do not occur, whereas they do occur on XP /
> > 2000 / 9x.

>
> > I thought I read something to that effect, but can not find the reference.

>
> > Thanks.


Hello,

I have the same problem but my application sends almost every second
some
new message to the screen which I now cannot see anymore ( it shows
relevant information about the process ).
If the process ask for user-intervention then the screen is active
again.
It is very unpleasant because the messages which are lost are
important.
May be it was already in XP but it does not show up there

Herman

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-19-2007
Kevin
 

Posts: n/a
Re: Does Vista treat Not Responding windows special?

<helpdesk@finofix.nl> wrote in message
news:1174068426.294627.254010@d57g2000hsg.googlegr oups.com...
> On Feb 9, 5:58 am, "Skywing [MVP]"
> <skywing_NO_SP...@valhallalegends.com> wrote:
>> The shell will hide the `broken' window and substitute a `ghost' window
>> with
>> similar characteristics that is moveable and responds to messages. If
>> the
>> program wakes back up, the `ghost' window is removed and the real window
>> is
>> moved/sized according to what the user did with the `ghost' window.
>>
>> This is similar to Windows XP and Windows Server 2003.
>>
>> If you have attached to a process with a debugger, the behavior of
>> creating
>> `ghost' windows is suppressed for the process being debugged so long as
>> the
>> debugger remains attached.
>>

<snip>
>
> I have the same problem but my application sends almost every second
> some
> new message to the screen which I now cannot see anymore ( it shows
> relevant information about the process ).


This is because the application is not running the "while (GetMessage()) /
DispatchMessage()" loop. Pre-XP, application windows that did not run the
standard message loop were ill-behaved, but the screen would still be
updated. From XP and beyond, these ill-behaved apps get their windows
disconnected from the screen.


> If the process ask for user-intervention then the screen is active
> again.


This is because the user-intervention probably displays a DialogBox(), which
does run the "while (GetMessage()) / DispatchMessage()" loop. The
previously-sent messages get processed, so the window is no longer "Not
Responding", and screen updates can occur.


> It is very unpleasant because the messages which are lost are
> important.


You have to run the standard message loop, and split the processing into
"chunks", and process a "chunk" while handling a window message.

Or, you run the standard message loop, but start a new thread to do the
processing.

Or, you convert the program to be a console application.


> May be it was already in XP but it does not show up there


I found that the MSDN for GetMessage documents this "ghost" behavior for XP:

"Windows XP: If a top-level window stops responding to messages for more
than several seconds, the system considers the window to be hung and
replaces it with a ghost window that has the same z-order, location, size,
and visual attributes. This allows the user to move it, resize it, or even
close the application. However, these are the only actions available because
the application is actually hung. When in the debugger mode, the system does
not generate a ghost window."

Note: the statement "the application is actually hung" is somewhat
misleading. The application is actually still running. But, because it is
ill-behaved, the operating system classifies it as hung.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-27-2008
talkspam
 

Posts: n/a
Re: Does Vista treat Not Responding windows special?

Microsoft has a very naive view about how applications actually work
with respect to what should or should not be considered a "hung"
application. You can turn off ghosting of your application by adding the
following call to your startup logic:


DisableProcessWindowsGhosting();
Alternatively, if you have a compute loop but cannot actually process
message sent to your application, you can add:

PeekMessage(&msg,0,0,0,PM_NOREMOVE);
In XP, the ghosting only occurred if the user attempted to interact
with the application so you could quietly watch your program generate
output to the screen, but in Vista, the ghosting happens after five (5)
seconds of inactivity without consideration of what you have spent time
generating. Just pray that you don't have any 3D content displayed or
your display can't easily recover from the repaint that will occur when
you do start responding because in both cases, you are toast.


--
talkspam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-04-2008
confuzatron
 

Posts: n/a
Re: Does Vista treat Not Responding windows special?

So far, nobody has given correct info - looks like they've been reading
the documentation rather than experiencing the reality!

In Vista, as opposed to XP, it seems that if you have a message loop
that processes messages for a particular window, then Vista will decide
that your app is not responding, and 'ghost' it. This behaviour is
different from that in XP. The solution appears to be to pass 0 as the
hwnd parameter to GetMessage, to receive all the messages for the
thread, and then discard/dispatch those that are aimed at windows
you're not interested in.


In XP you could pass a value for hwnd into getmessage in your message
loop (eg for some modal behaviour like rubber banding on the window in
question) but in Vista, the same code will result in ghosting.


--
confuzatron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Start Menu Handling of Special Office Shortcuts =?Utf-8?B?amltbXVo?= microsoft.public.windows.vista.general 33 12-22-2007 19:15
Search causes Vista to stop responding Jeno microsoft.public.windows.vista.file management 6 03-01-2007 03:02
Windows Media Players Has Stopped Responding, Faulting Module mswm =?Utf-8?B?SnVzdGlu?= microsoft.public.windows.vista.general 0 02-28-2007 21:02
Special Vista NVIDIA website for bug reporting RR Johnson Jr. microsoft.public.windows.vista.games 2 02-28-2007 14:07
Flight Simulator X not responding in Vista =?Utf-8?B?RlNYIG5vdCByZXNwb25kaW5nIG9uIFZpc3Rh?= microsoft.public.windows.vista.games 1 02-28-2007 14:05




All times are GMT +1. The time now is 13:37.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com and Win7Heads.com.


Funny Commercials to make you laugh :-)

Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119