xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Heinz" <AHe...@exstream.com>
Subject transcoding crash on mac
Date Fri, 09 Apr 2004 15:10:42 GMT
[ 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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Mime
View raw message