[ Xerces 2.3.0 and 2.4.0, Mac 9.2 (via 10.2), Codewarrior 8.3 ]

I'm getting a crash "unmapped memory exception" on my first call to transcode.

        // Initialize Xerces
        try {
                XMLPlatformUtils::Initialize();
        }
        catch (const XMLException& exception) {
                return errXercesInit;
        }

        // Create XML document.
->      LPXSTR psxLS = XMLString::transcode(_T("LS"));
        DOMImplementation* pImpl = 
DOMImplementationRegistry::getDOMImplementation(psxLS);
        DOMDocumentType* pDocType = 
pImpl->createDocumentType(DXFDefs::X_ELEM_DLG_DOCUMENT, NULL, _X("dialogue.dtd"));
        m_pDoc = pImpl->createDocument(DXFDefs::X_URI_DIALOGUE, 
DXFDefs::X_ELEM_DLG_DOCUMENT, pDocType);

Any ideas?  My call stack is:

XMLString::transcode(const char*)
MacOSLCPTranscoder::transcode(const char*)
MacOSLCPTranscoder::transcode(const char*, MemoryManager*)

The crash is at MacOSUnicodeConverter.cpp:1185, the call to ArrayJanitor:

ArrayJanitor<XMLCh> newResult
        (
                (XMLCh*)manager->allocate((newCnt + 1) * sizeof(XMLCh))// new 
XMLCh[newCnt + 1];
                , manager
        )

Adam Heinz
Senior Software Developer
Exstream Software


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

Reply via email to