• Xerces-C version number => 1.5(xml4c3_5_0-win32)
  • Platform  => PC
  • Operating system and version number => Win NT 4.0 Workstation
  • Compiler and version number => Visual Studio C++ 6.0
  • The XML document (or excerpt) that failed
  • The C++ application code that failed
  • Whether you built the Xerces-C library yourself or used the binary distribution
  •     => used the binary distribution.
  • What happened
  •     => Got the Access violation exception when called nextElement()
  •  
    Code :
    ....
       SchemaGrammar* grammar = (SchemaGrammar*) parser.getValidator().getGrammar();
       RefHash3KeysIdPoolEnumerator<SchemaElementDecl> elemEnum = grammar->getElemEnumerator();
       if (elemEnum.hasMoreElements())
       {
            while(elemEnum.hasMoreElements())
            {
                // Exception here  
                const SchemaElementDecl& curElem = elemEnum.nextElement();
    ...


    template <class TVal> TVal& RefHash3KeysIdPoolEnumerator<TVal>::nextElement()
    {
        // If our index is zero or past the end, then we are done
        if (!fCurIndex || (fCurIndex > fToEnum->fIdCounter))
            ThrowXML(NoSuchElementException, XMLExcepts::Enum_NoMoreElements);
     
        // Return the current element and bump the index
        return *fToEnum->fIdPtrs[fCurIndex++];   // the exception will be thrown
    }
     
    // Debut Result.
       fCurIndex = 1
       fToEnum->fIdCounter = 65
       fToEnum->fldPtrs => 0x0000006d
       fToEnum->fHashModulus = 128
       fToEnum->fHash = 0x00000009
       fToEnum->fIdPtrsCount = 4261281277
       fToEnum->fIdPtrs[1] = CXX0030: Error: expression cannot be evaluated.
     

    Reply via email to