Debug assertion failure

Discussion in 'C++' started by Kostatus, Aug 3, 2003.

  1. Kostatus

    Kostatus Guest

    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?
     
    Kostatus, Aug 3, 2003
    #1
    1. Advertising

  2. 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
     
    Gianni Mariani, Aug 3, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Todd Miller

    gc assertion failure

    Todd Miller, Oct 29, 2003, in forum: Python
    Replies:
    3
    Views:
    483
    Michael Hudson
    Oct 30, 2003
  2. Tim Peters

    RE: gc assertion failure

    Tim Peters, Oct 29, 2003, in forum: Python
    Replies:
    3
    Views:
    692
    Todd Miller
    Oct 29, 2003
  3. Yang
    Replies:
    1
    Views:
    281
    Christophe
    Oct 27, 2006
  4. Replies:
    22
    Views:
    1,296
    Richard Heathfield
    Jun 19, 2007
  5. Gone With Wind

    Debug Assertion Failure?

    Gone With Wind, May 25, 2008, in forum: C++
    Replies:
    3
    Views:
    436
    Gone With Wind
    May 25, 2008
Loading...

Share This Page