Okay, I think I see the problem. I was running a debug build of my project. This debug build links in msvcrtd.lib and msvcirtd.lib which appear to conflict with the release version of the run time linked into the Xerces parser. I fixed the problem by setting up my debug project to link with the release versions of the C run time.
Regards, Mike Krause Hewlett-Packard Company -----Original Message----- From: Joe Gregorio [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2000 1:29 PM To: [EMAIL PROTECTED] Subject: Re: bug?? A way to see which DLLs are being used is to use DEPENDS.EXE which comes with VC6. It will tell you which 'should' be loaded if the exe was run. Another way is to use pview.exe which is also a part of VC6 and will tell you which DLL is 'really' loaded. You may find that another application running has a local MSVCRT.DLL that is older than the one in the \winnt\system directory. NT will only load one copy of a DLL with the same name and if another application is running and has an older copy of the MSVCRT.DLL then that is the one you will get. -joe Rahul Jain wrote: > > > > > > > Version number : 1.0.1 > > Platform: NT4 + SP4 > > Compiler: MSVC6 > > > > Sample file: Attached---Its basically a cut paste of DOMPrint sample > > > > Problem: In function ostream& operator<<(ostream& target, const DOMString& s) > > > > When delete is called on p it results in a Debug Assertion. > > In dbgheap.c and while evaluating the expression _CrtlsValidHeapPointer(pUserData) > > > > > if ((strcmp(nodeName.transcode(),"Hole") == 0) || > > (strcmp(toWrite.getParentNode().getNodeName().transcode(),"Hole") == 0) || > > (strcmp(nodeName.transcode(),"Assembly") == 0) || > > (strcmp(nodeName.transcode(),"Part") == 0)) { > > In the file that you sent with the mail, I see definite memory leaks. > However, I do not see any other problems. As Mike mentioned make sure > you are using the 'correct' runtime dll. > > One way to ensure that everything matches up would be to download > the source archive and recompile the Xerces-C library on your machine. > That way the library and your application will use the same DLL's. > > When you call 'transcode()', it allocates memory to store the trancoded > string and it is the callers responsibility to delete it. The code > in operator<< in DOMPrint and your sample is doing the right thing. > > rahul ------------------------------------- Joe Gregorio MTS System Corp Program Manager www.mts.com
