Resending with proper Code Snippet:
{
XercesDOMParser parser;
ErrorReporter errReporter;
parser.setErrorHandler(&errReporter);
char *p="/home/local/share/project";
parser.parse(p); /* Here it is crashing */
if (!errReporter.sawErrors()) {
DOMDocument* doc = parser.getDocument();
if (doc != 0)
loadDocument(doc);
}
--- On Tue, 12/13/11, Vinay Kumar <[email protected]> wrote:
From: Vinay Kumar <[email protected]>
Subject: Re: Xerces Parse Function Crashing
To: [email protected]
Cc: [email protected]
Date: Tuesday, December 13, 2011, 7:49 AM
The Code Snippet is as follows:
{
XercesDOMParser parser;
ErrorReporter errReporter;
parser.setErrorHandler(&errReporter);
std::cout << "---!Inside the load!---" << configFile.c_str() <<
std::endl;
parser.parse(configFile.c_str());
if (!errReporter.sawErrors()) {
DOMDocument* doc = parser.getDocument();
if (doc != 0)
loadDocument(doc);
}
--- On Tue, 12/13/11, Vinay Kumar <[email protected]> wrote:
From: Vinay Kumar <[email protected]>
Subject: Xerces Parse Function Crashing
To: [email protected]
Cc: [email protected]
Date: Tuesday, December 13, 2011, 6:27 AM
Hi All,
I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string
of length
of
to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with
Segmentation fault as follows:
Program received signal
SIGSEGV, Segmentation fault
si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400000000283dde0 in <unknown_procedure> ()
(gdb) bt
#0 0x400000000283dde0 in <unknown_procedure> ()
warning: Attempting to unwind past
bad PC 0x400000000283dde0
#1 0x40000000010ed990:0 in
xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
#2 0x40000000010d7760:0 in
xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
#3
0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short
const*)+0xc90 ()
#4 0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
+0x80 ()
#5 0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
+0x1c0 ()
Please let me know the reason for getting this error. What are the changes
needed to fix this error?
Thanks & Regards,
Vinay