2009-09-16 126 views
0

我已经追踪了我的死锁,并且不再抽出消息,但是我该如何更进一步,弄清楚线程目前正在做什么?我使用的WinDbg和随机游动使用!不要也没有给我anuthing到目前为止我怎么知道是什么的UnsafeNativeMethods.DispatchMessageA通话使用的WinDbg在做什么?

千恩万谢

奥斯卡

0:057> !clrstack 
OS Thread Id: 0x17f8 (57) 
ESP  EIP  
1393f1ac 2070a64a [NDirectMethodFrameStandalone: 1393f1ac] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageA(MSG ByRef) 
1393f1bc 04851c91 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32) 
1393f258 04851276 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 
1393f2a0 048507e3 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 
1393f2d0 0485062f System.Windows.Forms.Application.Run() 

回答

1
!dumpstack 

的伎俩,好详细的堆栈跟踪到非托管的DLL

+0

+1,因为我讨厌看到没有选票被接受的答案:) – 2009-10-02 06:22:21

0

KN100会给你本地栈,但它看起来就像它叫DispatchMessage,这意味着它可能卡在目标窗口的窗口处理程序中(即“OnSize”事件或代码中的某个事件)

破解打开MSG结构以便您可以e窗口和它试图发送的消息,然后在代码中找到相应的事件处理程序。

相关问题