Tag Archives: debugging

Reporting compiler bugs

Once in a life-time, you run into a compiler bug … well, that used to be the case, before HLSL/GLSL/OpenCL/CUDA/C++0x whatever started to crop up and require new front and especially code generation back-ends. More often than not, people just … Continue reading

Posted in Programming | Tagged , , | 2 Comments

Debug war story

Time for a war story: I’ve been just debugging a rather interesting bug. The application is written in C++. Symptoms: Starting the release build by double clicking fails Starting the release build from the command line works Appending a debugger … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Debugging shaders: Artifacts grouped into quads

If you’re debugging a shader, and the wrong pixels come grouped into (screen-aligned) 2×2 blocks, don’t look too long at the code at hand — it might be that your gradients are wrong. Recently, I had a shader aliasing problem, … Continue reading

Posted in Graphics | Tagged , | Leave a comment

C++ tricks, #5: Breaking on memory allocations with VC

A little known feature is breaking on a specific memory allocation without recompiling your app. Let’s assume you’ve run your code with _CrtDumpMemoryLeaks (); and you got something like Detected memory leaks! Dumping objects -> {12213} normal block at 0x004DA780, … Continue reading

Posted in Programming | Tagged , | Leave a comment