Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1219

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1219
    Summary: SCMPrint segfault
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Samples/Tests
   Versions:
             2.5.0

   Assignee: 
   Reporter: John Hurliman

    Created: Wed, 19 May 2004 5:49 PM
    Updated: Wed, 19 May 2004 5:49 PM
Environment: Linux dimension2350 2.6.6-rc3 #4 Wed May 5 14:13:59 PDT 2004 i686 
Intel(R) Celeron(R) CPU 1.70GHz GenuineIntel GNU/Linux

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/configure --prefix=/usr 
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include 
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man 
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared 
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib 
--enable-languages=c,c++,f77,objc --enable-threads=posix --enable-long-long 
--disable-checking --enable-cstdio=stdio --enable-clocale=generic 
--enable-__cxa_atexit --enable-version-specific-runtime-libs 
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include/g++-v3 
--with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext 
--disable-multilib
Thread model: posix
gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)

Xerces-C++ 2.5.0 compiled with socket code, debugging, pthread

Description:
I tried to run SCMPrint with the first schema included in the XBRL 
(http://www.xbrl.org/) conformance suite, and it started processing it apparently 
correctly until it got to the last element, and failed here:

--------------------------------------------
Name:                   http://www.xbrl.org/2003/XLink, resourceType
Component Type: Type Definition
Category:               Complex
Base:                   anyType
Segmentation fault

Debugging revealed processParticle was getting passed a null XSParticle from 
xsComplexTypeDef->getParticle(). By removing the line:

processParticle(xsComplexTypeDef->getParticle());

and replacing it with:

XSParticle *xsParticle = xsComplexTypeDef->getParticle();
if (xsParticle) {
    processParticle(xsParticle);
} else {
    XERCES_STD_QUALIFIER cout << "xsParticle is NULL";
}

The program worked, and ran through all the other namespaces without problems as well. 
It only printed the "xsParticle is NULL" for the resourceType, nowhere else. Matching 
up the output of the software with the schema file xlink-2003-12-31.xsd it seems all 
the content models are mismatched, and the schema file says everything is a simpleType 
but the parser says everything is Complex. I'm not sure which files from the 
conformance suite need to be included to reproduce this, but please e-mail me if you 
need any of the xml files.

101-01-ImportExample.xsd
------------------------

<!-- XBRL 2.1 Tests -->
<!-- Copyright 2003 XBRL International. See www.xbrl.org/legal.  All Rights Reserved. 
-->
<xsd:schema targetNamespace="http://mycompany.com/xbrl/taxonomy/ext";
xmlns:xbrli="http://www.xbrl.org/2003/instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

        <xsd:import namespace="http://www.xbrl.org/2003/instance";
        schemaLocation="../lib/xbrl-instance-2003-12-31.xsd"/>

        <xsd:element name="retainedEarnings"
        type="xbrli:monetaryItemType" substitutionGroup="xbrli:item"
        id="a3" xbrli:periodType="duration"/>

</xsd:schema>


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to