Category Archives: Debugging

iOS OpenGL ES compatibility gotcha

Oh man, I just wasted too many hours of my life trying to figure out why calls to glBlitFramebuffer in my iOS app were returning GL_INVALID_OPERATION. I was targeting iOS 7, so I should’ve been able to use OpenGL ES 3.0 calls, and after all, I’d built against the v3 headers and everything else was […]

Also posted in iOS, Software Development | Tagged , , , | Leave a comment

Examining PDB files with DBH

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 […]

Also posted in Software Development, Visual Studio, WinDbg | Tagged , , , , , | 2 Responses

.NET DLLs Loaded Twice

There’s a bug in 32-bit .NET 2.0 where assemblies are loaded twice, wasting valuable address space.

Also posted in .NET, Windows | Tagged , , , | 4 Responses

Am I being called from DllMain?

How can you tell if your code is being called from within DllMain? You could use an undocumented function from ntdll.dll.

Also posted in .NET, Visual Studio, WinDbg, Windows | Leave a comment

.NET 4.0 Type Equivalence causes BadImageFormatException

Interop assemblies containing certain constructs will cause a BadImageFormatException in .NET 4.0

Also posted in .NET, COM, WinDbg, Windows | Tagged , , , , , , | 6 Responses

Modifying the VC runtime to get better heap allocation stack traces

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?

Also posted in Software Development, WinDbg, Windows | Tagged , , , | 2 Responses

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.

Also posted in .NET, COM, Software Development, WinDbg | Tagged , , , , , , | 3 Responses

Don’t do anything in DllMain… Please

Thinking of adding some code to your DLLs DllMain function? STOP!

Also posted in Software Development, Uncategorized, Windows | Tagged , , , , | Leave a comment

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!

Also posted in Usability, Visual Studio | Tagged , | Leave a comment

Getting IUnknown from __ComObject

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

Also posted in .NET, COM, Software Development, WinDbg, Windows | Tagged , , , , | 6 Responses
  • Follow me on Twitter Follow me on Twitter @voyce

  • Check out Wordz my new fast-paced make-a-word game for iOS.
  • Categories

  • Archives