You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by James Pearson <ja...@computer.org> on 2000/08/02 07:16:05 UTC
After transcode, delete bombs in dll
Hi All,
I hope this isn't too dumb a question: does Xerces have special
"considerations" when it's run from within a DLL?
A bit of background:
I'm using the 1_2_0a release of Xerces, built with MSVC++ 6.0SP3 using the
supplied debug version project files on Win2000 Professional. The code is
compiled into a DLL.
The Problem:
When I run the following code (which is in the dll):
if( str.equals("TaskName") ){
char* str = cNode.getNodeValue().transcode();
strcpy( m_TaskName, str );
delete [] str; <<== bombs out here
}
The error I get when it tries to execute "delete [] str;" :
Debug Assertion Failed!
File: dbgheap.c
Line: 1011
Expression: _CrtIsValidHeapPointer(pUserData)
The top of the stack (for what it's worth) looks like:
NTDLL! 77f9f9df()
NTDLL! 77fb4966()
NTDLL! 77f8b3d2()
KERNEL32! 77e944cd()
_CrtIsValidHeapPointer(const void * 0x0093a830) line 1606
_free_dbg_lk(void * 0x0093a830, int 1) line 1011 + 9 bytes
_free_dbg(void * 0x0093a830, int 1) line 970 + 13 bytes
operator delete(void * 0x0093a830) line 49 + 16 bytes
Is there a problem running Xerces within a DLL? Is there a problem with a
buffer being allocated in some "other" context but being deleted in mine?
Thanks,
Jim Pearson