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=21328>.
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=21328

MemBufInputSource "adoptBuffer" set to true results in assertion failure

           Summary: MemBufInputSource "adoptBuffer" set to true results in
                    assertion failure
           Product: Xerces-C++
           Version: 2.2.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validating Parser (DTD)
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I want to use MemBufInputSource to load up a dtd from a resource dll, via the 
EntityResolver.  When I set the adoptBuffer to true, when the parse is 
complete and the MemBufInputSource attempts to cleanup, an assertion failure 
happens.

I wrote a simple app to test MemBufInputSource adoptBuffer (code snippet 
below) and it also fails.

        MemBufInputSource * inputSource;
        XMLCh buffer[1024];
        std::string systemId = std::string
("C:\\temp\\SAXSchemaParser\\fake.xml");
        bool success = XMLString::transcode(systemId.c_str(), buffer, 1023);
                
        if (success) {
                std::string * toDeleteBuf = new std::string("SomeBuffer");
                inputSource = new MemBufInputSource ((const XMLByte*)
toDeleteBuf->c_str(), toDeleteBuf->length(),
                        buffer, true);
        }

        delete inputSource;

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

Reply via email to