Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

problem with xerces-c-src_2_5_0 parse method

Hi All,

I am facing a problem with parse method of xerces sax parser.
i am running my c++ application on AIX 5.2. here i am trying to parse inputsource of MemBufInputSource !!!
parse(*memBufIS); where -MemBufInputSource* memBufIS.

The problem is when ever i add <!DOCTYPE to the xml the application is giving core dump at parse method.

Now the same application when is executed on our solaris with xerces_1_5_1 we r calling parse method as parser->parse(*memBufIS, dtd); here dtd is a bool. and is false.

In xerces API we have only one parameter for parse method. So, it must have been overloaded again by somebdy.
The mystery is SAX parser (xerces-c-src_2_5_0) of our AIX machine has the functionality of <!DOCTYPE ... still its giving core dump when evr we r adding <!DOCTYPE to the xml.

Could somebody help me out off this !!!!!

Thank u in advance !!!

Vamsi
Satyam computer services ltd
[981 byte] By [vamsid] at [2007-11-11 7:39:50]
# 1 Re: problem with xerces-c-src_2_5_0 parse method
I have no idea how xerces is implemented but it looks like one of the two likely scenarios:
1) a bug in the API. In this case, you need to contact the vendor. You can't fin the binaries on your own anyway.
2) you're passing invalid arguments to the function. You should check the documentation to find out what the expectec parameters are to ensure that this isn't what's causing the core dump.
Danny at 2007-11-11 21:02:00 >
# 2 Re: problem with xerces-c-src_2_5_0 parse method
Thank u very much for the Reply...!!!!
But i am passing a valid argument to parse method in our AIX machine.
on Solaris 2 arguments were sent.. to accomodatye this even the parse method was overloaded in the saxparser.cpp file...
vamsid at 2007-11-11 21:03:05 >
# 3 Re: problem with xerces-c-src_2_5_0 parse method
It is very hard to debug code that is not the same. You are basically asking, why does foo(x) and foo(x,y) not do the same thing on different platforms -- the problem is intractable.

Build the exact same code on both machines and see if you get the exact same results. --OR-- build the code using the two different functions on just one machine and see what that does.
jonnin at 2007-11-11 21:04:05 >
# 4 Re: problem with xerces-c-src_2_5_0 parse method
The fact that you're using two different overloaded functions is irrelevant -- thes eare two distinct functions, with separate code, addresses etc. So there's no way to tell why one succeeds and the other fails without looking into the crashing function's code, either at the assembly level or the source file level -- if you have access to it.
Danny at 2007-11-11 21:05:05 >