Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Debug assertion failure

Reply
Thread Tools

Debug assertion failure

 
 
Kostatus
Guest
Posts: n/a
 
      08-03-2003
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?


 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      08-03-2003
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debug Assertion Failure? Gone With Wind C++ 3 05-25-2008 10:57 AM
Debug Assertion Failure on gets(char) function kudruu@gmail.com C Programming 22 06-19-2007 02:44 PM
Assertion failure on hotshot.stats.load() Yang Python 1 10-27-2006 08:32 AM
gc assertion failure Todd Miller Python 3 10-30-2003 10:44 AM
RE: gc assertion failure Tim Peters Python 3 10-29-2003 10:27 PM



Advertisments