PDA

View Full Version : weird bug in VC 6 debug mode only


Jack Norton
11-08-2006, 08:28 AM
I got a weird error on VC - maybe someone can help, or maybe is just an obscure bug :)

I simply start my game and exit and I get the attached image error. If I click "retry" I see the execution on dbgheap.c, this piece of code:
if (!CheckBytes(pbData(pHead) + pHead->nDataSize, _bNoMansLandFill, nNoMansLandSize))
_RPT3(_CRT_ERROR, "DAMAGE: after %hs block (#%d) at 0x%08X.\n",
szBlockUseName[_BLOCK_TYPE(pHead->nBlockUse)],
pHead->lRequest,
(BYTE *) pbData(pHead));

Curiously on release mode nothing happens. Also a friend tested on CW and no bug. So must be something relative only to Visual C (I have version 6).

If anyone has any guess, is welcome :)

Nutter
11-08-2006, 09:04 AM
Well that's the debug-only heap corruption checks - it's disabled in release builds, which is why it's not showing up. In short, it means that you're writing past the end of an allocation somewhere (look at the output window for the address, and match that up to a pointer in your game).

Jack Norton
11-08-2006, 09:20 AM
Bah actually was a bug of VC... I did a clean - rebuild all and worked! I'm downloading VC Express right now :D

Fabio
11-09-2006, 02:22 AM
VC2005 has some nasty bugs as well (can't talk about this one).

I'm using Orcas beta which corrects most of them (present even in the VC2005 SP1 beta).