You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "David Bertoni (JIRA)" <xe...@xml.apache.org> on 2010/07/05 19:32:49 UTC
[jira] Assigned: (XERCESC-1933) After parsing an XML with PVI
information kept, the DOMLSParser object crashes when released...
[ https://issues.apache.org/jira/browse/XERCESC-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Bertoni reassigned XERCESC-1933:
--------------------------------------
Assignee: David Bertoni
> After parsing an XML with PVI information kept, the DOMLSParser object crashes when released...
> -----------------------------------------------------------------------------------------------
>
> Key: XERCESC-1933
> URL: https://issues.apache.org/jira/browse/XERCESC-1933
> Project: Xerces-C++
> Issue Type: Bug
> Components: DOM, Validating Parser (XML Schema)
> Affects Versions: 3.1.1
> Environment: Windows XP SP3, Visual Studio 8 (2005), also XQuilla 2.2.4 (but not necessary to get the crash)
> Reporter: Alain BOHL
> Assignee: David Bertoni
> Attachments: file.xml, file.xsd
>
>
> XMLPlatformUtils::Initialize();
> DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Core"));
> m_parser = impl->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
> DOMConfiguration *config = m_parser->getDomConfig();
> config->setParameter(XMLUni::fgDOMNamespaces, true);
> config->setParameter(XMLUni::fgXercesSchema, true);
> config->setParameter(XMLUni::fgXercesHandleMultipleImports, true);
> config->setParameter(XMLUni::fgXercesSchemaFullChecking, true);
> config->setParameter(XMLUni::fgDOMComments, false);// Suppression des commentaires
> config->setParameter(XMLUni::fgDOMElementContentWhitespace, false);// Suppression des blancs
> config->setParameter(XMLUni::fgDOMValidateIfSchema, true); // config->setParameter(XMLUni::fgDOMValidate, true);
> // enable datatype normalization - default is off
> config->setParameter(XMLUni::fgDOMDatatypeNormalization, true);
> //************** If the following line is deleted the crash does not happen ****************
> config->setParameter(XMLUni::fgXercesDOMHasPSVIInfo, true);
> // Creation et installation of the error handler
> DOMReseauErrorHandler errorHandler;
> config->setParameter(XMLUni::fgDOMErrorHandler, &errorHandler);
> XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = NULL;
> // reset document pool
> m_parser->resetDocumentPool();
> if (xsdFile.length() > 0)
> {
> Grammar* grammar;
> grammar = m_parser->loadGrammar(XMLString::transcode("file.xsd"), Grammar::SchemaGrammarType, true);
> //************************** grammar is not NULL
> }
> doc = m_parser->parseURI(XMLString::transcode("file.xml"));
> //***************************** No xml parser error were met
> delete m_parser; //*********************** Crash on this line ***********************************
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org