engllf
asked on
_CrtlsValidHeapPointer(pUserData)
WinNT4 SP3, VC5,
During exiting of program give the below assertion error:
_CrtlsValidHeapPointer(pUs erData). Pressing the debug button brings me to DBGHeap.C.
_ASSERTE(_CrtIsValidHeapPo inter(pUse rData));
When i debug from ExitInstance(), it leads me to the below in CRT0CAT.C
if (__onexitbegin) {
_PVFV * pfend = __onexitend;
while ( --pfend >= __onexitbegin )
/*
* if current table entry is non-NULL,
* call thru it.
*/
if ( *pfend != NULL )
(**pfend)(); // Assert error...
}
What is cause of this problem?
I have exited the ExitInstance(), does that mean that all my view, doc, has been successfully deleted? There where does the bad pointer comes from?
However in Release mode, exiting doesn't give any problem.
Is there is time bomb on the Release version?
During exiting of program give the below assertion error:
_CrtlsValidHeapPointer(pUs
_ASSERTE(_CrtIsValidHeapPo
When i debug from ExitInstance(), it leads me to the below in CRT0CAT.C
if (__onexitbegin) {
_PVFV * pfend = __onexitend;
while ( --pfend >= __onexitbegin )
/*
* if current table entry is non-NULL,
* call thru it.
*/
if ( *pfend != NULL )
(**pfend)(); // Assert error...
}
What is cause of this problem?
I have exited the ExitInstance(), does that mean that all my view, doc, has been successfully deleted? There where does the bad pointer comes from?
However in Release mode, exiting doesn't give any problem.
Is there is time bomb on the Release version?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If i send out a Release version with this problem, what will be the consequenses? System crash?
ASKER
What i have is just a SDI with 2 pane splitter wnd.
Simply launch the application, do nothing, exit the application already gives this problem. What a terrible headache ...
Simply launch the application, do nothing, exit the application already gives this problem. What a terrible headache ...
ASKER
I have stripped my application to
BOOL CIPD_WINDDEApp::InitInstan ce()
{
return FALSE; // immediate exit
}
Still give me the problem. Now where does the CWnd comes from?
BOOL CIPD_WINDDEApp::InitInstan
{
return FALSE; // immediate exit
}
Still give me the problem. Now where does the CWnd comes from?
I gave you only an exaple what could cause a problem. Anywhay this debug function is called when heap corruption occurs. If your application is not large could you send it to me so I will be able to review it. My E-mail: agalkin@matlensilver.com
ASKER
Thanx galkin,
I manage to solve the problem.
I guess the bad pointer is some
char* i defined in the CWinApp class.
After moving them out of the CWinApp
and define them as global variables,
no more assert failure.
leow
I manage to solve the problem.
I guess the bad pointer is some
char* i defined in the CWinApp class.
After moving them out of the CWinApp
and define them as global variables,
no more assert failure.
leow
ASKER