Solved

DEBUG ERROR!

Posted on 2000-05-04
2
211 Views
Last Modified: 2010-04-02
Dear All,

 A DEBUG Error appears when I call a delete operation in my program, eg

delete video_decoder;

I checked that it had passed all the operations in the destructor however, it can't return to my main program.

In the debug error message, it shows:

DAMAGE: after Normal block (#28) at 0x00A40060.

Do you know the reason and any solution?

Thanks
0
Comment
Question by:littleboy
2 Comments
 

Expert Comment

by:forza
ID: 2779731
Can you post some code?
0
 
LVL 3

Accepted Solution

by:
LucHoltkamp earned 100 total points
ID: 2779782
I think you overwritten a piece of memory after or before the memory you allocated, somewhere you use an uninitialised pointer, or reference a piece of memory bejond the allocated range.
In DEBUG mode, MFC (if its VC) will allocate a small extra piece of memory before and after a block of memory that is allocated with new.
When the memory is deleted, it checks if you've overwritten that piece of memory, and if so, issues an assertion.
Luc
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question