Hi John,
Did you ever find out the culrpit behind your hang? I have a similar problem:
Code:
MSG msg;
for (;;)
{
if (WAIT_FAILED != ::MsgWaitForMultipleObjectsEx(1, &hsem, INFINITE, QS_ALLINPUT, MWMO_INPUTAVAILABLE))
{
::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
.
.
.
}
Which will on the rare occasion hang with this call stack:
ntdll.dll!***@0()
user32.dll!***@20() + 0xc bytes
user32.dll!***@20() + 0x167 bytes
This was observed on a single-proc XPSP3 box.
- Paul.
JohnD wrote:
Hi Norman,But then I'd see my window proc on the stack.
08-Feb-08
Hi Norman
But then I'd see my window proc on the stack. The top of the C-stack is as
listed in my first mail, the app seems to be hung in the KiFastSystemCallRe
function
/john
Previous Posts In This Thread:
On Thursday, February 07, 2008 9:13 AM
JohnD wrote:
Why would PeekMessage(&msg,0,0,0,PM_NOREMOVE) hang?
Hello all
I have a case where PeekMessage(&msg,0,0,0,PM_NOREMOVE) hangs
My understanding of PeekMessage is that it returns "If no messages are
available, the return value is zero." So under what circumstances might it
hang
The full code snippet is more like
if (HIWORD(GetQueueStatus(QS_ALLINPUT))
return PeekMessage(&msg,0,0,0,PM_NOREMOVE)
The relevant call stack is listed below
ntdll.dll!***@0(
user32.dll!***@20() + 0xc byte
user32.dll!***@20() + 0x167 byte
ours.dll!MessageLoop(int (void)* readfn=0x03e2ac70) Line 1161 + 0x18
bytes
Thanks for your help
/john
On Thursday, February 07, 2008 8:19 PM
Norman Bullen wrote:
Re: Why would PeekMessage(&msg,0,0,0,PM_NOREMOVE) hang?
JohnD wrote
MSDN says "The PeekMessage function dispatches incoming sent messages...
Perhaps a sent message is hanging in its window procedure
Nor
--
Nor
To reply, change domain to an adult feline.
On Friday, February 08, 2008 6:52 AM
JohnD wrote:
Hi Norman,But then I'd see my window proc on the stack.
Hi Norman
But then I'd see my window proc on the stack. The top of the C-stack is as
listed in my first mail, the app seems to be hung in the KiFastSystemCallRe
function
/john
Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET Providerless Custom Forms Authentication, Roles and Profile with MongoDb
http://www.eggheadcafe.com/tutorials/aspnet/27f836b7-2c9e-4942-9712-1c7b901cadcc/aspnet-providerless-custom-forms-authentication-roles-and-profile-with-mongodb.aspx