- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
In a program that I am working on, I get the following error:
Debug Assertion Failed!
Program:TAGenPro.exe
File: dbgheap.c
Line: 1044
Expression: _CrtIsValidHeapPointer(pUserData)
It occurs at the line:
DEALLOCATE( NODE%NODE , STAT=STATUS)
where NODE is a linked list. I believe that the NODE being deallocated in the statement was also the target of a previous pointer, and has already been deallocated. However, it seems that if this is the case, then the STAT should catch this anyway.
Am I on the right track? Can anyone suggest anything? (CVF6.6a, Win2k)
Matt.
Debug Assertion Failed!
Program:
File: dbgheap.c
Line: 1044
Expression: _CrtIsValidHeapPointer(pUserData)
It occurs at the line:
DEALLOCATE( NODE%NODE , STAT=STATUS)
where NODE is a linked list. I believe that the NODE being deallocated in the statement was also the target of a previous pointer, and has already been deallocated. However, it seems that if this is the case, then the STAT should catch this anyway.
Am I on the right track? Can anyone suggest anything? (CVF6.6a, Win2k)
Matt.
Link kopiert
4 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
What is happening is that the Debug version of the Visual C++ RTL is detecting that a block of memory is being freed twice, and is issuing the assertion when the Fortran RTL tries to free it. I'm not sure why the Fortran RTL didn't detect the error - you may have corrupted some other data.
If you can send us (to vf-support@compaq.com) a short example that shows the problem, we'll look into it.
Steve
If you can send us (to vf-support@compaq.com) a short example that shows the problem, we'll look into it.
Steve
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
It seems that, in some way, this should be caught by the STAT identifier instead of causing an execution failure of the RTL.
I am studying how to build a smaller example and/or just avoiding the double-deallocation.
Matt.
I am studying how to build a smaller example and/or just avoiding the double-deallocation.
Matt.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I agree - if it can tell that the pointer has already been deallocated, it should quickly return with an error. However, if the call is made to the C RTL's "free", then if the C RTL signals an assertion, there's not much CVF can do.
Steve
Steve
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Well, well ...
I received the same message as well: "Debug Assertion Failed". Please also remember that the program compiled just fine in the Debug mode. It was at the time of testing the program on data that I got this cryptic message.
The program I am using is way over my head and therefore, I did not DARE to change any one of the pointers, allocate/deallocates, ... However, I could
compile and successfully run the program in Release mode.
Now, my question is what happens if the program really needs a debugging for a different reason or part? Wouldn't I get stuck in this nuisance "Assertion Failure" and fail to debug it?
Regards ... Hossein
I received the same message as well: "Debug Assertion Failed". Please also remember that the program compiled just fine in the Debug mode. It was at the time of testing the program on data that I got this cryptic message.
The program I am using is way over my head and therefore, I did not DARE to change any one of the pointers, allocate/deallocates, ... However, I could
compile and successfully run the program in Release mode.
Now, my question is what happens if the program really needs a debugging for a different reason or part? Wouldn't I get stuck in this nuisance "Assertion Failure" and fail to debug it?
Regards ... Hossein

Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite