Solved heap corruption

I just debugged a heap corruption successfully :sunglasses:
The problem was in the ofImage::setColor(x, y, color) method. I called it with an x and y out of bounds. This never gave a warning or a segmentation fault. Causing me to lose my mind for a few hours.

Maybe someone will run into a similar issue at some point. In Windows you can use GFlags and WinDbg, find them here. Really useful stuff, it allows to smell each allocated memory page to check for undesired writes.

For other platforms you can use Valgrind or others, just don’t give up on heap corruptions!

2 Likes

Just got a heap correction mesage yesterday for the first time and the solution is here! :smiley: