Perhaps this is related to something we have seen at my company.  The
LoadLibrary call resets the debug allocator.  Here is what we do.

#if _DEBUG
        // capture the debug allocator.
        _CRT_ALLOC_HOOK pfnHook;
        pfnHook = _CrtSetAllocHook(NULL);
        _CrtSetAllocHook(pfnHook);
#endif

        m_hModule = ::LoadLibrary(LibPath.c_str());

#if _DEBUG
                // If the load library call changed it, then restore the
value.
                _CRT_ALLOC_HOOK pfnHook2;
                pfnHook2 = _CrtSetAllocHook(pfnHook);
                if (pfnHook2 != pfnHook) 
                        MessageBox( NULL, "LoadLibrary changed the debug
allocator.", "Warning", MB_OK | MB_ICONINFORMATION );
#endif

David Schulze
DeLorme Mapping, Yarmouth, ME, USA

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:bugzilla@;apache.org]
Sent: Wednesday, November 06, 2002 3:18 PM
To: [EMAIL PROTECTED]
Subject: DO NOT REPLY [Bug 14311] New: - delete [] of char * from
XMLString::transcode() fails


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14311>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14311

delete [] of char * from XMLString::transcode() fails

           Summary: delete [] of char * from XMLString::transcode() fails
           Product: Xerces-C++
           Version: 2.1.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This is bizzare.  char* Win32LCPTranscoder::transcode(const XMLCh* const 
toTranscode) is allocating with new [], but trying to delete [] the returned

memory causes the _ASSERTE(_CrtIsValidHeapPointer(pUserData)); in dbgheap.c
to 
fail.

Calling into
bool Win32LCPTranscoder::transcode( const   char* const     toTranscode
                                    ,       XMLCh* const    toFill
                                    , const unsigned int    maxChars)
works fine.

About the only thing I can think of is I'm using VC6.0 SP5 with the off the 
shelf builds of xerces-c_2(D).lib and xerces-c_2_1_0(D).dll, which are 
putatively VC6.0 SP3.  Trawled the net and couldn't find any other
descriptions 
of this problem.

Email me and I'll send my very simple VC project.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to