Heap allocation stack traces are useless when using certain versions of the MSVC runtime. Is it possible to modify and rebuild MSVCR80 to avoid this?
Category Archives: Debugging
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.
Don’t do anything in DllMain… Please
Thinking of adding some code to your DLLs DllMain function? STOP!
Pinned DataTips in Visual Studio 2010 Beta 2
I’ve just noticed a nice little feature in Visual Studio 2010 Beta 2: pinned DataTips. Values displayed in the debugger as you hover over a variable can now be pinned in place and remain aligned with the source. They can even have annotations added… Tasty!
Getting IUnknown from __ComObject
How do you find the unmanaged COM object that’s being referenced by a .NET object?
Diagnosing out of memory errors with VMMap – Part 2
(I had problems with WordPress choking on this long post, so I’ve split it into 2 parts. The first part is here. This is the second part).
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.
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 [...]
Getting .NET type information in the unmanaged world
One of the tools that I write and maintain displays type information for COM objects hidden behind “handles” in Excel spreadsheets. The underlying objects can either support an interface that allows them to be richly rendered to XML, or the viewer will fall-back to using metadata and displaying the supported interfaces and their properties and methods. It [...]
Beware cached IDispatch
I’ve kinda given it away there with the title, but we had an interesting set of symptoms exhibited the other day while trying to call a function in an Excel workbook via F#. It appeared that the function being called would fail depending on what had been called previously. Very odd.
A bit of background: as you [...]
