You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2004/03/15 16:23:58 UTC

DO NOT REPLY [Bug 27669] New: - unmapped memory exception during transcode

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=27669

unmapped memory exception during transcode

           Summary: unmapped memory exception during transcode
           Product: Xerces-C++
           Version: 2.4.0
          Platform: Macintosh
        OS/Version: MacOS 9
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Utilities
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: aheinz@cs.indiana.edu


The following crashes on the last line:

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

// ... non-Xerces initialization ...

// Create XML document.
DOMImplementation* pImpl = DOMImplementationRegistry::getDOMImplementation(_X
("LS"));

I replaced the last line to test my XStr class, but I get the same error doing 
a vanilla transcode:

If I use a constant, however, I don't get the error:

const XMLCh[] sxLS = { chLatin_L, chLatin_S, chNull };
DOMImplementation* pImpl = DOMImplementationRegistry::getDOMImplementation
(sxLS);

This is fine for some situations, but obviously, a program where everything is 
constant isn't very interesting!  This same code that crashes on MacOS 9.2 
works fine on Win2K.

Stack trace:

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

The crash is on MacOSUnicodeConverter.cpp::1185, the ArrayJanitor<XMLCh> 
newResult( ... ) call.

I've been following the Mac transcoding thread, and it seems that this error 
may go away with the deprecation of the UnicodeConverter in 2.5; I haven't 
tested this theory yet.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org