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 suparswa2004 <su...@gmail.com> on 2009/05/12 09:32:03 UTC
Core dump while creating a DOMParser object
I am getting the following problem.
A C program with DOM Parsing, is compiled successfully.
But while executing, segment violation is occuring while initialising the
DOM parser. I am using AIX 5..3.
Source code is like:
#include<iostream.h>
#include<memory>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/framework/XMLFormatter.hpp>
#include <xercesc/util/TranscodingException.hpp>
#include <xercesc/dom/DOM_DOMException.hpp>
#include <xercesc/parsers/DOMParser.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/util/XMLString.hpp>
int main(int argc, char *argv[])
{
cerr<<"program starts..."<<endl;
XMLPlatformUtils::Initialize();
DOMParser::ValSchemes gValScheme = DOMParser::Val_Auto;
bool gDoNamespaces = false;
bool gDoSchema = false;
bool gSchemaFullChecking = false;
bool gDoCreate = false;
XMLCh* gEncodingName = 0;
XMLFormatter::UnRepFlags gUnRepFlags =
XMLFormatter::UnRep_CharRef;
XMLFormatter* gFormatter = 0;
cerr<<"Before creating DOMparser"<<endl;
DOMParser *l_aParser;
try{
l_aParser = new DOMParser();
}
catch (const DOM_DOMException& e)
{
cerr << "A DOM error occured during parsing\n
DOMException code: "
<< e.code << endl;
}
through dbx, the following shows.
Segmentation fault in lock__8XMLMutexFv at 0x9000000082e4b68 ($t1)
0x9000000082e4b68 (lock__8XMLMutexFv+0x8) e8630000 ld r3,0x0(r3)
(dbx) where
lock__8XMLMutexFv() at 0x9000000082e4b68
__ct__12XMLMutexLockFP8XMLMutex() at 0x9000000082e4bec
gScannerMutex__Fv() at 0x900000008339a68
commonInit__10XMLScannerFv() at 0x900000008333320
__ct__10XMLScannerFP12XMLValidator() at 0x900000008333198
__ct__9DOMParserFP12XMLValidator() at 0x9000000082fa0d4
Please suggest.
--
View this message in context: http://www.nabble.com/Core-dump-while-creating-a-DOMParser-object-tp23497578p23497578.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org