Kostatus wrote:
When I close my program and call:
delete *iter2;
(iter2 being an iterator of a vector which contains pointers to objects)
I get a "Debug Assertion Failed!" message (using VC++ 6) with the following
details:
File: dbgheap.c
Line: 1017
Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
What does this mean?
It means that data structures used to manage the heap have been
corrupted by your program.
<the rest is off topic for this ng>
This is usually caused by writing off the end of an array.
These bugs are usually very difficult to find. First an most obvious
place to look is a few lines before the crash but the corruption could
have been caused by virtually anything - even reading from a file.
If it is really this difficult you'll need to use a malloc debugging
tool of some kind. I use valgrind and efence on Linux. You could use
purify on Windows but I have have zero success personally with purify on
windows - most probably I don't know how to use it correctly.
Good luck.
G