Solved

DEBUG ERROR!

Posted on 2000-05-04
2
209 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

  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 …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

803 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