Hello,
I am getting a run-time debug error of the following type:
DAMAGE: after Normal block (#XXX) at 0xXXXXXXXX
It seems to be related to the KB article Q172398 - BUG: Debug Assertion When Assigning to STL string. However, I cannot use this fix as I am not using strings, but a buffer of characters, so I cannot call strvar.erase(). Here is the code that eventually causes the error:
if (GetClientRect(appGetWnd(), &lpRect))
{
width = lpRect.right - lpRect.left;
height = lpRect.bottom - lpRect.top;
acBuffer = (unsigned char *) malloc(width*height*PIXEL_COMPONENTS);
ScreenShot(0, 0, width, height, GL_BGR_EXT, GL_UNSIGNED_BYTE, acBuffer);
WriteTGA("Screenshot.tga", width, height, acBuffer);
free(acBuffer);
}
You can see that the size of the buffer changes whenever the window has been resized.
I have searched through Google and have not found anything that helps me out. Any input as to how to solve this problem would be greatly appreciated.
--zer0FX
I am getting a run-time debug error of the following type:
DAMAGE: after Normal block (#XXX) at 0xXXXXXXXX
It seems to be related to the KB article Q172398 - BUG: Debug Assertion When Assigning to STL string. However, I cannot use this fix as I am not using strings, but a buffer of characters, so I cannot call strvar.erase(). Here is the code that eventually causes the error:
if (GetClientRect(appGetWnd(), &lpRect))
{
width = lpRect.right - lpRect.left;
height = lpRect.bottom - lpRect.top;
acBuffer = (unsigned char *) malloc(width*height*PIXEL_COMPONENTS);
ScreenShot(0, 0, width, height, GL_BGR_EXT, GL_UNSIGNED_BYTE, acBuffer);
WriteTGA("Screenshot.tga", width, height, acBuffer);
free(acBuffer);
}
You can see that the size of the buffer changes whenever the window has been resized.
I have searched through Google and have not found anything that helps me out. Any input as to how to solve this problem would be greatly appreciated.
--zer0FX