On Apr 9, 2004, at 8:10 AM, Adam Heinz wrote:


[ 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.

Hi Adam,


Is this the same as your bug report #27669: http://issues.apache.org/bugzilla/show_bug.cgi?id=27669.

The situation looks similar, but in that bug report you state you're not able to reproduce the issue with a simple test case. Can you review? Also, in that bug report I asked you about the state of the memory manager being passed into the call--I'm still suspicious of that.

One thing that would cause the memory manager to be bad at that point would be if static construction was turned off in your CodeWarrior environment. Is that the case?

James.



// 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]




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



Reply via email to