Home > Archive > VC Language > November 2005 > _CrtIsValidHeapPointer ??? ASSERT ERROR
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
_CrtIsValidHeapPointer ??? ASSERT ERROR
|
|
|
| Hi all,
I have one system tha use one dll, and this always get
_CrtIsValidHeapPointer ASSERTION ERROR, I don't know how I can fix this,
Anyone can Help-me.
Thanks
| |
| Ulrich Eckhardt 2005-11-28, 7:07 pm |
| ReTF wrote:
> I have one system tha use one dll, and this always get
> _CrtIsValidHeapPointer ASSERTION ERROR, I don't know how I can fix this,
Both the debug and release runtimes have different heaps. Above error is
usually the effect of a) mixing those two and b) acquiring memory from one
heap and releasing it into the other.
Uli
| |
| Gary Chang[MSFT] 2005-11-29, 4:02 am |
| Hi,
I agree with Uli's opinion, more specificly, since the heap created the in
DLL may be different from the heap created in the EXE(DLL uses a different
runtime from the EXE), so your application may try to delete the object
from a different heap.
In order to get access to the DLL's object, the EXE must be compiled with
the same CRT runtime as the DLL so that they share the same heap. This may
not be the best way to go since in the future any program working with the
DLL would have to be compiled with same version of CRT runtime. Another way
to do this is to expose a method in the DLL to clean up its own objects.
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|