Satya Das wrote:
No I don’t know of a way to get to the message queue given HWND. However
I would look for 2 things
- What was the thread that crashed doing ? If the thread posted a
message and then went on to crash, what was it doing actually ?
The application (at least this part of it) is single threaded;
PostMessage() is used in some cases to prevent the upper layer
modules from having to deal with re-entrancy issues.
The thread that crashed was processing a FD_CONNECT notification.
It was trying to remove an item from a linked list, but the list
was empty.
The list can (in theory) only be empty if no connect request
has been made, a connect request was made but the return value
indicated error (not WSAEWOULDBLOCK nor ERROR_SUCCESS), or the
connect request has already completed.
The upper layer module had not received a connect notification
yet. Since this notification is performed synchronously (without
the use of the PostMessage), I know this code path wasn’t taken.
The upper layer module was also in a state consistent with
having issued a connect request, so I’m pretty sure a request
was issued.
That kind of leaves me with the theory that I got a error return
from the connect() call, and therefore did a PostMessage(). Then,
before the message was processed, I got an FD_CONNECT.
Normally, this isn’t possible, but I also see a couple of
modules on the stack that look like personal firewall type
products-- probably either Layered Service Providers (LSP)
or winsock hooks. My experience with these beasts is that
this is just the type of inconsistency they tend to introduce.
So I was hoping to be able to verify my theory by finding the
in-flight message.
Probably, I’m just going to change my lower level module so
the result is stored locally to the object and the windows message
pump is used only for the notification (currently, the result
data is passed through the message pump as an lparam.)
That way I can see the result data in the crash if it is in
flight.
Thanks,
Joseph
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joseph Galbraith
Sent: Thursday, July 21, 2005 9:01 PM
To: Kernel Debugging Interest List
Subject: [windbg] Trying to find a message in the message queue…
I have an application which crashed shortly after
calling PostMessage().
Is there some way to dig up that message (presuming
it hasn’t been processed?) I have the HWND it
was posted to, and I’m working with a full user mode
mini-dump.
Thanks,
Joseph