Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-910

SAX2Print crashes after reading schema

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Incomplete
    • 2.3.0
    • None
    • Samples/Tests
    • None
    • Operating System: Linux
      Platform: PC
    • 20387

    Description

      Running the following command that used to run fine in xerces-c-src2_2_0:
      ./SAX2Print -f -p -v=always chapter07.xml

      On the following files:

      chapter07.xml:
      =======
      <product xmlns="http://example.org/prod7"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://example.org/prod7 chapter07.xsd">
      <name/>
      <size/>
      </product>

      =======

      chapter07.xsd:
      =======

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns="http://example.org/prod7"
      targetNamespace="http://example.org/prod7"
      elementFormDefault="qualified">

      <xsd:element name="product" type="ProductType"/>
      <xsd:element name="size" type="xsd:integer" fixed="10"/>

      <xsd:complexType name="ProductType">
      <xsd:sequence>
      <xsd:element name="name" default="N/A">
      <xsd:simpleType>
      <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
      <xsd:element ref="size" minOccurs="0"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>

      =======

      Causes the following stack trace:
      (gdb) bt
      #0 xercesc_2_3::RefHashTableOf<xercesc_2_3::Grammar>::removeAll (
      this=0x8072270)
      at /home/xml/xerces-c-src_2_3_0/include/xercesc/util/RefHashTableOf.c:264
      #1 0x402c60f6 in
      xercesc_2_3::RefHashTableOf<xercesc_2_3::Grammar>::~RefHashTableOf
      (this=0x8072270, __in_chrg=3)
      at /home/xml/xerces-c-src_2_3_0/include/xercesc/util/RefHashTableOf.c:216
      #2 0x401e46f8 in xercesc_2_3::GrammarResolver::~GrammarResolver (
      this=0x80715f0, __in_chrg=3) at GrammarResolver.cpp:125
      #3 0x4015345d in xercesc_2_3::AbstractDOMParser::cleanUp (this=0xbfffb310)
      at AbstractDOMParser.cpp:177
      #4 0x40153076 in xercesc_2_3::AbstractDOMParser::~AbstractDOMParser (
      this=0xbfffb310, __in_chrg=0) at AbstractDOMParser.cpp:143
      #5 0x40279c54 in xercesc_2_3::XercesDOMParser::~XercesDOMParser (
      this=0xbfffb310, __in_chrg=0) at XercesDOMParser.cpp:98
      #6 0x402a4d18 in xercesc_2_3::XSDDOMParser::~XSDDOMParser (this=0xbfffb310,
      __in_chrg=2) at XSDDOMParser.cpp:87
      #7 0x401ebeb7 in xercesc_2_3::IGXMLScanner::resolveSchemaGrammar (
      this=0x8052150, loc=0x8071518, uri=0x80716b0) at IGXMLScanner2.cpp:1442
      #8 0x401eb4ec in xercesc_2_3::IGXMLScanner::parseSchemaLocation (
      this=0x8052150, schemaLocationStr=0x80712f0) at IGXMLScanner2.cpp:1285
      #9 0x401eb19d in xercesc_2_3::IGXMLScanner::scanRawAttrListforNameSpaces (
      this=0x8052150, theRawAttrList=0x80562a8, attCount=3)
      at IGXMLScanner2.cpp:1247
      #10 0x401f50aa in xercesc_2_3::IGXMLScanner::scanStartTagNS (this=0x8052150,
      gotData=@0xbfffb683) at IGXMLScanner.cpp:2034
      #11 0x401f1ac8 in xercesc_2_3::IGXMLScanner::scanContent (this=0x8052150,
      extEntity=false) at IGXMLScanner.cpp:849
      #12 0x401effed in xercesc_2_3::IGXMLScanner::scanDocument (this=0x8052150,
      src=@0x8057308) at IGXMLScanner.cpp:209
      #13 0x40290940 in xercesc_2_3::XMLScanner::scanDocument (this=0x8052150,
      systemId=0x80572a0) at XMLScanner.cpp:419
      #14 0x40290f19 in xercesc_2_3::XMLScanner::scanDocument (this=0x8052150,
      systemId=0xbffffb90 "chapter07.xml") at XMLScanner.cpp:427
      #15 0x4022dc24 in xercesc_2_3::SAX2XMLReaderImpl::parse (this=0x8051900,
      systemId=0xbffffb90 "chapter07.xml") at SAX2XMLReaderImpl.cpp:637
      #16 0x804bae6 in main (argC=5, argV=0xbffffa44)
      at /home/xml/xerces-c-src_2_3_0//samples/SAX2Print/SAX2Print.cpp:340
      #17 0x404a2b65 in __libc_start_main (main=0x804b208 <main>, argc=5,
      ubp_av=0xbffffa44, init=0x804ad58 <_init>, fini=0x804ddfc <_fini>,
      rtld_fini=0x4000df24 <_dl_fini>, stack_end=0xbffffa3c)
      at ../sysdeps/generic/libc-start.c:111
      (gdb)

      Attachments

        Activity

          People

            Unassigned Unassigned
            jztif56@yahoo.com jim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: