Re: Debug Assertion Failure
- From: "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
- Date: Fri, 15 Jun 2007 07:57:08 -0400
katz911@xxxxxxxxx wrote:
Hello,
I've encountered a strange problem I don't know how to approach.
I've written a program with a MFC interface. Through that interface,
the user can call a function, which has nothing to do with MFC - it's
a function that reads data from a file, and works correctly when I try
to use it in a test, non-mfc program.
When the debugger hits the "return true" line of that function, a
debug assertion failure window pops:
File: dbgheap.c
Line: 1011
Expression: _CrtIsValidHeapPointer(pUserData)
I have no idea what that means, nor why does an MFC error occur in a
"regular" function that doesn't deal with MFC.
Any help would be greatly appreciated,
GK
In a debug build, each time you allocate or free any heap memory the heap manager checks the validity of everything in the heap management structures. This is done to catch an invalid situation as soon as possible. The heap manager is not related to MFC, it is part of the runtime lib used by all C and C++ code in your program. The error probably means a pointer was passed to the heap manager for deletion, and the pointer was not the address of an allocated heap block.
--
Scott McPhillips [MVP VC++]
.
- Follow-Ups:
- Re: Debug Assertion Failure
- From: katz911
- Re: Debug Assertion Failure
- References:
- Debug Assertion Failure
- From: katz911
- Debug Assertion Failure
- Prev by Date: Re: Debug Assertion Failure
- Next by Date: Re: Scrolling.
- Previous by thread: Re: Debug Assertion Failure
- Next by thread: Re: Debug Assertion Failure
- Index(es):
Relevant Pages
|