Tag Archives: WinDbg

Beware of using stack-based COM objects from .NET

COM objects that don’t have the expected lifetime can cause chaos when combined with .NETs garbage collection system.

Posted in .NET, COM, Debugging, Software Development, WinDbg | Also tagged , , , , , | Leave a comment

Getting IUnknown from __ComObject

How do you find the unmanaged COM object that’s being referenced by a .NET object?

Posted in .NET, COM, Debugging, Software Development, WinDbg, Windows | Also tagged , , , | 4 Comments

Finding the largest free block of address space

I’ve been seeing problems recently with fragmented virtual address space. During the lifetime of a process, bits and pieces of memory are allocated throughout the 2GB 32-bit address space to such an extent that large contiguous blocks of free space are no longer available. If anything subsequently requires a large block of memory (like, for [...]

Posted in Software Development, WinDbg, Windows | Also tagged , , , , | 2 Comments

Diagnosing out of memory errors with VMMap

VMMap is a new tool from Mark Russinovich et al that’s very useful for diagnosing virtual memory/address space exhaustion issues. I describe it here, and give some information that should help you interpret what it reports.

Posted in Debugging, Software Development, WinDbg, Windows | Also tagged , , , | 1 Comment

WinDbg !locks command broken

It seems that the extremely useful !locks command is broken in 6.11.1.40x, the current and previous release of WinDbg from the debugging tools for Windows.
You’ll get errors like:

0:007> !locks
NTSDEXTS: Unable to resolve ntdll!RTL_CRITICAL_SECTION_DEBUG type
NTSDEXTS: Please check your symbols

The suggested solution seems to be to roll-back to version 6.10.3.233, available from here, or you can just [...]

Posted in Debugging, WinDbg | Also tagged | 1 Comment

Troubleshooting an InvalidProgramException

One of the developers who uses the .NET/COM interop DLL that I wrote recently informed me that when they used it in a certain way, they would get a fatal System.InvalidProgramException. Nasty. So I set about seeing how I could find out exactly why this was happening: here are the gory details…
To spoil the ending [...]

Posted in .NET, Software Development, WinDbg, Windows | Also tagged , , , , , , , | Leave a comment