473,835 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debug assertion failure

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?
Jul 19 '05 #1
1 12234
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

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3170
by: Todd Miller | last post by:
Hi, I recently discovered an assertion failure in the Python garbage collection system when scripts using our C extension (numarray) exit. The assertion is activated for Pythons configured using --with-pydebug. I have a feeling I may be doing something wrong with garbage collection support for some of our c types, but I'm not sure exactly what. Here is the assertion output:
6
595
by: Cormac | last post by:
Hi everyone, I'm writing Pure Data externals in C++ using Ms Visual C++ 7.0 and Windows2000. I'm running motions sensor hardware so there's a bit of real time data processing involved. When I'm running my objects in Pure Data, I get an assertion failure after a few seconds of running the motion sensors and I can't seem to get rid of it. The error occurs in the expression _CrtCheckMemory(). Could anyone provide some possible solutions?
0
1686
by: Guohui He | last post by:
Hi All, I am trying to update our application from VC 6.0 to VC 7.1 (.NET 2003) as managed extension. Now the compilation seems to be fine and the release version works also. However, when I run the debug version, I always get an error: Debug Assertion Failed! File: f:\vs70builds\3077\vc\MFCATL\ship\atlmfc\include\afxwin1.inl Line: 26
0
2964
by: lawrence | last post by:
Hi, I made a MFC ActiveX with a CwinThread Class in VC ++. Then i used it on Visual basic. When i try to make an exe i got this error : Debug Assertion Failed! Program: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VB98\VB6.EXE File: cmdtarg.cpp Line: 52
9
2335
by: Bern McCarty | last post by:
I am porting stuff from MEC++ syntax to the new C++/CLI syntax. Something that we did in the old syntax that proved to be very valuable was to make sure that the finalizer would purposefully generate an assertion failure for unoptimized, debug builds. We did this to find and fix cases where we were relying upon finalization rather than pro-active Dispose() calls. For classes that introduced IDisposable() into the class hierarchy...
2
5576
by: Pushpa | last post by:
Hi All, This my part of the c++ program using threads in windows : //modified by pushpa struct structExrdDoc { CExrdDoc* spDoc; LPCTSTR sstrFileName;
2
3407
by: rsr | last post by:
hi, I am unable to execute my application though I am able to build and compile it without warnings or errors, because of this. Debug Assertion failure file tcscat_s.inl line: 42 can anyone tell me what does this mean?
22
3090
by: kudruu | last post by:
Hello, I am having a problem in Microsoft Visual C++ with some code I have written (I am a bit of a novice so I appologize if this is a very mundane problem). This is a segment from one of the functions I am using. I am trying to get a user to input whether they want an output file or not and if they do to specify the name. Output_File is a global char. Maybe there is a better way to do this, nonetheless, it compiles with a LNK4075...
1
1872
by: aalam | last post by:
class base { int a; base(int x) { a=x; } ~base(); } class derive:public base
2
2465
by: Gone With Wind | last post by:
I am a novice of C++. I write the following code to append strings to a Combox (m_RibNum). This control component is on a PropertyPage hosted on a PropertySheet. int i; char buffer; CString s for (i=0;i<5;i++) { itoa(i+1,buffer,10);
0
9808
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9652
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10523
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10561
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9346
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7766
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5638
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3089
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.