Wow, it’s been a ridiculously long time since I’ve blogged. I think it’s time I put something up just to break the curse, and this seemed like a good, and hopefully useful, place to start. Time to polish some of these dusty drafts into published gems. Ever been in that situation where you (or someone […]
How can you tell if your code is being called from within DllMain? You could use an undocumented function from ntdll.dll.
Interop assemblies containing certain constructs will cause a BadImageFormatException in .NET 4.0
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?
COM objects that don’t have the expected lifetime can cause chaos when combined with .NETs garbage collection system.
How do you find the unmanaged COM object that’s being referenced by a .NET object?
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 […]
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.
It seems that the extremely useful !locks command is broken in 184.108.40.206x, 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 220.127.116.11, available from […]
Also posted in Debugging
Tagged Debugging, WinDbg
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 […]
Also posted in .NET, Software Development, Windows
Tagged .local, .NET, dll, gac, InvalidProgramException, mscoree, mscorjit, mscorwks, WinDbg