當我使用!htrace -diff在WinDbg中調試句柄泄漏,我得到了很多的句柄(可能有泄漏的那些)沒有顯示調用堆棧的:HTRACE沒有顯示出調用堆棧
可能是什麼原因爲此,我還有哪些選項需要進一步調試?
Handle = 0x000273e4 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273e0 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273dc - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273d8 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273d4 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273d0 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273cc - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273c8 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273c4 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273c0 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273bc - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273b8 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273b4 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273b0 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273ac - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273a8 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
Handle = 0x000273a4 - OPEN
Thread ID = 0x00001190, Process ID = 0x0000114c
--------------------------------------
更新:句柄泄漏似乎取決於圖形驅動程序或圖形卡。當我使用任何形式的WPF時它開始泄漏,它只在某些帶有某些圖形卡/驅動程序的Windows XP系統上泄漏。
您正在運行的操作系統是什麼? 這是轉儲還是現場調試? 您之前是否打過'!htrace -enable'? – 2011-10-10 19:54:23
Windows XP,是的,我確實調用了'!htrace -enable'還有另外一個線索:句柄泄漏似乎取決於圖形驅動程序或圖形卡。當我使用任何形式的WPF時它開始泄漏,它只在某些帶有某些圖形卡/驅動程序的Windows XP系統上泄漏。 – bitbonk 2011-10-11 05:25:02
您可以使用'!handle 0x000273c4 0xf'來查看有關特定0x000273c4句柄的更多信息。然後,您會知道句柄的類型是您正在尋找的類型。如果泄漏與GDI有關,則它們由另一個句柄池處理,而不在列表中,您可以使用!句柄進行處理。 GDI泄漏是痛苦的,我不知道任何記錄的方式來跟蹤他們。您可以從NirSoft試用此工具(http://www.nirsoft.net/utils/gdi_handles.html),看看您是否能夠縮小問題範圍。 – 2011-10-11 07:12:15