ofTexture::allocate issue

Hi,

Using VS2008 express, I have started to get this popup error message saying:
“Windows has triggered a breakpoint in blah.exe …
This may be due to the corruption of the heap, which indicates a bug…”

It seems to be happening whenever ofTexture::allocate() is called, as this is where the VS debugger halts at. I have experienced this with two different projects and was wondering if anyone else has experienced this and if they have a remedy?

It seems to halt on the line:
“if (bUseARBExtention && GLEE_ARB_texture_rectangle){
…”

and it looks as though bUseARBExtention is set to true. The strange thing is that the project in question was compiling and running fine and then the above only started happening when I added the ofxOpenCV add on.

Thanks for any help.
Adam

There’s probably some kind of memory related bug in your code. I don’t think it’s significant that it’s stopping at that line, it’s more likely just a symptom of the bug.

The Heap is the space you access when allocating memory. Heap corruption usually happens when you access memory outside that which has been previously allocated.

Look for all instances of memory allocation in your code and make sure you are not using a pointer in an incorrect way.