Debug Assertion Failure



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

.



Relevant Pages

  • Re: Debug Assertion Failure
    ... I've encountered a strange problem I don't know how to approach. ... I've written a program with a MFC interface. ...
    (microsoft.public.vc.mfc)
  • Re: Debug Assertion Failure
    ... I've written a program with a MFC interface. ... each time you allocate or free any heap memory the heap manager checks the validity of everything in the heap management structures. ... 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. ...
    (microsoft.public.vc.mfc)
  • Re: Multithread heap assertion failure(Continued)
    ... there is "debug assertion failure" error around here in ... In fact, reading your source, I did neither find a definition for MFC global ... // return nRetCode; ... int ExitInstance{ ...
    (microsoft.public.vc.mfc)
  • MoveWindow does not move window on Vista.
    ... I am experiencing a strange problem on Vista. ... I have a bunch of windows, frames with splitters with childframes etc. ... On one level there is a MFC CFrameWnd hosting a MFC CDialog as a ... On XP the dialog gets it's WM_SIZE and the GUI looks like it should. ...
    (microsoft.public.win32.programmer.ui)
  • Re: Exception error in Windows98?
    ... There is a strange problem that i am facing on 98. ... Whenever you get an assertion error in MFC code, you MUST break the program and look at what the assertion code says, and then follow the call stack back to your own code. ...
    (microsoft.public.vc.mfc)