Hi,

I am using xercesc 2.8 on Sol10 x86 CC 5.7.
I have following program which hangs when ran. After some time it coredumps.
Please see the stack-trace below.
Thanks in advance for pointers. Also let me know if this is known issue and
any workaround for same?

Thanks,
-Abhijit

#include <iostream>
#include <xercesc/framework/MemBufInputSource.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMDocumentType.hpp>
#include <xercesc/dom/DOMElement.hpp>
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationLS.hpp>
#include <xercesc/dom/DOMNodeIterator.hpp>
#include <xercesc/dom/DOMNodeList.hpp>
#include <xercesc/dom/DOMText.hpp>

#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/util/XMLUni.hpp>

using namespace xercesc;
using namespace std;


int main() {
  try
  {
      XMLPlatformUtils::Initialize();  // Initialize Xerces infrastructure
    char buffer[260];
    strcpy(buffer,"<?xml version=\"1.0\" encoding=\"UTF-8\"?><command
actor=\"State\" action=\"start\"></comman
d>");
    XERCES_CPP_NAMESPACE::MemBufInputSource
memInput((XMLByte*)buffer,strlen(buffer),"TCPCommandSocket");
    XERCES_CPP_NAMESPACE::XercesDOMParser* m_parser =
(XERCES_CPP_NAMESPACE::XercesDOMParser*)new XERCES_CPP_NA
MESPACE::XercesDOMParser();

m_parser->setValidationScheme(XERCES_CPP_NAMESPACE::XercesDOMParser::Val_Always);
    m_parser->setDoNamespaces(true);
  m_parser->parse(memInput);
  }
  catch(...) {
        cout << "Exception" << endl;
  }
  return 0;
}

Stack shows this:

=>[1] xercesc_2_8::DOMNodeImpl::getOwnerDocument(0x46c2f0, 0x46c2e8, 0x2,
0x0, 0xffffffccfffffff8, 0x0), at 0xfffffd7fff078496
  [2] xercesc_2_8::DOMAttrMapImpl::setNamedItemNS(0x0, 0x0, 0x0, 0x0, 0x0,
0x0), at 0xfffffd7fff059550
  [3] xercesc_2_8::DOMElementImpl::setAttributeNodeNS(0x0, 0x0, 0x0, 0x0,
0x0, 0x0), at 0xfffffd7fff06ff1f
  [4] xercesc_2_8::AbstractDOMParser::startElement(0x0, 0x0, 0x0, 0x0, 0x0,
0x0), at 0xfffffd7fff0307f4
  [5] xercesc_2_8::IGXMLScanner::scanStartTagNS(0x0, 0x0, 0x0, 0x0, 0x0,
0x0), at 0xfffffd7fff0cba20
  [6] xercesc_2_8::IGXMLScanner::scanContent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0),
at 0xfffffd7fff0c800b
  [7] xercesc_2_8::IGXMLScanner::scanDocument(0x0, 0x0, 0x0, 0x0, 0x0, 0x0),
at 0xfffffd7fff0c6824
  [8] xercesc_2_8::AbstractDOMParser::parse(0x0, 0x0, 0x0, 0x0, 0x0, 0x0),
at 0xfffffd7fff02f2f9
  [9] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x401832
(dbx)

Reply via email to