Alberto/Team,

Now I created a standalone pointer to SAXParser. I am initializing the
pointer once in my constructor. And I was reusing the pointer for every
xml validation request without deleting the pointer to SAXParser.

But I am getting core dump at different  point, again this is happening
at the third request or fourth request. Below is the back trace from
core dump.

#0  0xd6b49384 in
xercesc_2_7::RefHash2KeysTableOf<xercesc_2_7::SchemaAttDef>::removeAll+0
x5c ()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
(gdb) bt
#0  0xd6b49384 in
xercesc_2_7::RefHash2KeysTableOf<xercesc_2_7::SchemaAttDef>::removeAll+0
x5c ()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#1  0xd6b49298 in
xercesc_2_7::RefHash2KeysTableOf<xercesc_2_7::SchemaAttDef>::~RefHash2Ke
ysTableOf<xerces c_2_7::SchemaAttDef>+0x20 () from
/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#2  0xd6b49148 in xercesc_2_7::ComplexTypeInfo::~ComplexTypeInfo+0xe8 ()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#3  0xd6c659a8 in
xercesc_2_7::RefHashTableOf<xercesc_2_7::ComplexTypeInfo>::removeAll+0x6
8 ()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#4  0xd6c654f4 in
xercesc_2_7::RefHashTableOf<xercesc_2_7::ComplexTypeInfo>::cleanup+0x14
()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#5  0xd6c651f8 in
xercesc_2_7::RefHashTableOf<xercesc_2_7::ComplexTypeInfo>::~RefHashTable
Of<xercesc_2_7:: ComplexTypeInfo>
   +0x20 () from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#6  0xd6c650ac in xercesc_2_7::SchemaGrammar::cleanUp+0x8c () from
/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#7  0xd6c64a74 in xercesc_2_7::SchemaGrammar::~SchemaGrammar+0x34 ()
from  /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#8  0xd6bec070 in
xercesc_2_7::RefHashTableOf<xercesc_2_7::Grammar>::removeAll+0x68 ()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#9  0xd6bed8e0 in xercesc_2_7::GrammarResolver::reset+0x18 () from
/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#10 0xd6bee368 in
xercesc_2_7::GrammarResolver::cacheGrammarFromParse+0x18 ()
   from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#11 0xd6c02a28 in xercesc_2_7::IGXMLScanner::scanReset+0x40 () from
/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#12 0xd6bf5508 in xercesc_2_7::IGXMLScanner::scanDocument+0x80 () from
/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#13 0xd6c52454 in xercesc_2_7::SAXParser::parse+0x17c () from
/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
#14 0x5bdda0 in XMResponseParser::validateMsgBuffer (this=0x7788b07d,
schemaLoc=0x7788af2c "") at XMResponseParser.cc:119


Thanks & Regards,
Sasikumar Kandhasamy
Project Engineer | Wipro Technologies | Madivala-4 | Bangalore.
Mobile:- +91 9986378586 

"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul
Kalam


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 5:11 PM
To: [email protected]
Subject: RE: Getting core dump at xerces::SAXParser::parse function


Hi Alberto,
Now I moved both the objects to local declaration. And in destructor, I
am not doing any thing. Even then I am getting crash.

Below is the destructor code,

XMResponseParser::~XMResponseParser()
{
    /*if ( theDOMSupportPtr != NULL ) {
        delete theDOMSupportPtr;
        theDOMSupportPtr = NULL;
    }
    if ( theLiaisonPtr != NULL ) {
        delete theLiaisonPtr;
        theLiaisonPtr = NULL;
    }*/
    ItsuDebugEnter( XMResponseParser, XMResponseParser-Destructor ); } 


Thanks & Regards,
Sasikumar Kandhasamy
Project Engineer | Wipro Technologies | Madivala-4 | Bangalore.
Mobile:- +91 9986378586 

"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul
Kalam


-----Original Message-----
From: Alberto Massari [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 4:09 PM
To: [email protected]
Subject: RE: Getting core dump at xerces::SAXParser::parse function

At 16.06 08/08/2007 +0530, [EMAIL PROTECTED] wrote:

>They are non static variables. But I have declared both the objects 
>globally.

So they *are* static....

Alberto


>Thanks & Regards,
>Sasikumar Kandhasamy
>Project Engineer | Wipro Technologies | Madivala-4 | Bangalore.
>Mobile:- +91 9986378586
>
>"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul 
>Kalam
>
>
>-----Original Message-----
>From: Alberto Massari [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 08, 2007 4:02 PM
>To: [email protected]
>Subject: RE: Getting core dump at xerces::SAXParser::parse function
>
>Hi Sasikumar,
>I cannot speak for the Xalan part, but I find suspicious that you are 
>deleting two variables theDOMSupportPtr and theLiaisonPtr that are not 
>part of the class definition. If they are static variables, you are 
>destroying something that you will need later.
>
>Alberto
>
>At 15.51 08/08/2007 +0530, [EMAIL PROTECTED] wrote:
>
> >Hi Alberto,
> >
> >Below is my class declaration,
> >
> >class XMResponseParser
> >{
> >     public:
> >        XMResponseParser();
> >        ~XMResponseParser();
> >
> >        void             validateMsgBuffer(char *);
> >        void             retrieveElementValue(const string
&expression,
> >string &returnVal);
> >        bool             isElementExist(const string &xPath);
> >        void             setResponseXML(const string &respMsg);
> >
> >     private:
> >
> >        SAXPrintHandlers         handler;
> >        SAXParser                parser;
> >        string                   response;
> >};
> >
> >In parser application, I am using  XalanSourceTreeDOMSupport and 
> >XalanSourceTreeParserLiaison for Xpath. So I am deleting the memory 
> >in destructor. Below is the code,
> >
> >
> >XMResponseParser::~XMResponseParser()
> >{
> >     if ( theDOMSupportPtr != NULL ) {
> >         delete theDOMSupportPtr;
> >         theDOMSupportPtr = NULL;
> >     }
> >     if ( theLiaisonPtr != NULL ) {
> >         delete theLiaisonPtr;
> >         theLiaisonPtr = NULL;
> >     }
> >     ItsuDebugEnter( XMResponseParser, XMResponseParser-Destructor );

> >}
> >
> >
> >Thanks & Regards,
> >Sasikumar Kandhasamy
> >Project Engineer | Wipro Technologies | Madivala-4 | Bangalore.
> >Mobile:- +91 9986378586
> >
> >"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul 
> >Kalam
> >
> >
> >-----Original Message-----
> >From: Alberto Massari [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, August 08, 2007 3:43 PM
> >To: [email protected]
> >Subject: RE: Getting core dump at xerces::SAXParser::parse function
> >
> >Hi Sasikumar,
> >you must be doing something wrong in the destructor; could you post 
> >the
>
> >code? Otherwise it's just a guessing game...
> >
> >Alberto
> >
> >At 15.07 08/08/2007 +0530, [EMAIL PROTECTED] wrote:
> >
> >
> > >As per Alberto's suggestion, I moved Initialize/Terminate of both 
> > >XMLPlatformUtils and XPathEvaluator to main function. But still I 
> > >am getting crash.
> > >
> > >And if didn't call destructor(i.e., without using delete) of my 
> > >class
>
> > >"XMResponseParser" which internally has SAXParser object, then it 
> > >is working fine. Without deleting the memory of the object, I am 
> > >creating new object for the next request.
> > >
> > >But above scenario will lead to memory leak. Kindly give me the 
> > >suggestion why it is happening as above?
> > >
> > >
> > >Thanks & Regards,
> > >Sasikumar Kandhasamy
> > >Project Engineer | Wipro Technologies | Madivala-4 | Bangalore.
> > >Mobile:- +91 9986378586
> > >
> > >"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul

> > >Kalam
> > >
> > >
> > >-----Original Message-----
> > >From: [EMAIL PROTECTED] 
> > >[mailto:[EMAIL PROTECTED]
> > >Sent: Wednesday, August 08, 2007 2:02 PM
> > >To: [email protected]
> > >Subject: RE: Getting core dump at xerces::SAXParser::parse function
> > >
> > >
> > >Hi Alberto,
> > >Thanks for the information. I will verify the system after moving 
> > >the
>
> > >Initialize/Terminate to main.
> > >
> > >And one more question is "I am creating SAXParse for every xml 
> > >response
> >
> > >and end of validation, I am deleting the memory. Is that correct 
> > >way of
> >
> > >doing it?"
> > >
> > >Thanks & Regards,
> > >Sasikumar Kandhasamy
> > >Project Engineer | Wipro Technologies | Madivala-4 | Bangalore.
> > >Mobile:- +91 9986378586
> > >
> > >"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul

> > >Kalam
> > >
> > >
> > >-----Original Message-----
> > >From: Alberto Massari [mailto:[EMAIL PROTECTED]
> > >Sent: Wednesday, August 08, 2007 1:56 PM
> > >To: [email protected]
> > >Subject: Re: Getting core dump at xerces::SAXParser::parse function
> > >
> > >As the crash in inside the memory manager, it could be that you 
> > >called Terminate and then Initialize while still keeping some 
> > >objects
>alive.
> > >Please move the Initialize/Terminate calls to the "main"
> > >function and call them just once.
> > >
> > >Alberto
> > >
> > >At 13.46 08/08/2007 +0530, [EMAIL PROTECTED] wrote:
> > >
> > > >
> > > >Hi Team,
> > > >I am using xerces-c_2_7 SAXParser for validating XML and Xalan 
> > > >for Xpath Exp in our application. At runtime, our application may

> > > >invokes
> >
> > > >SAXParser more than once depending on response xml we are getting

> > > >into system.
> > > >
> > > >I am getting the core dump from my application when it reaches 
> > > >SAXParse::parse function for the second time.
> > > >
> > > >I am using SAXParser as member to my class. I have used 
> > > >Initialize and Terminate functions as advised in apache site.
> > > >
> > > >Below is the back trace from core dump. Kindly help me on this
> > > >
> > > >
> > > >
> > > >0xc0198170 in _sigfillset+0x5c0 () from /usr/lib/libc.2
> > > >#1  0xc0195c9c in _sscanf+0x68c () from /usr/lib/libc.2
> > > >#2  0xc019b374 in malloc+0x18c () from /usr/lib/libc.2
> > > >#3  0xc0ca5fdc in operator new+0x40 () from /usr/lib/libCsup.2
> > > >#4  0xd6c12214 in xercesc_2_7::MemoryManagerImpl::allocate+0x34
> > > >() from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#5  0xd6bc6bac in
> > > >xercesc_2_7::DatatypeValidator::setTypeName+0xe4
> > > >()
> >
> > > >from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#6  0xd6bccb50 in
> > > >xercesc_2_7::DatatypeValidatorFactory::createDatatypeValidator+0x
> > > >47
> > > >8
> > > >
> > > >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#7  0xd6c94478 in
> > > >xercesc_2_7::TraverseSchema::traverseByRestriction+0x1c60 ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#8  0xd6c85828 in
> > > >xercesc_2_7::TraverseSchema::traverseSimpleTypeDecl+0x888 ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#9  0xd6ca16a4 in
> > > >xercesc_2_7::TraverseSchema::getElementTypeValidator+0x164 ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#10 0xd6c90444 in
> > > >xercesc_2_7::TraverseSchema::traverseElementDecl+0xf34
> > > >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#11 0xd6c848a8 in
> > > >xercesc_2_7::TraverseSchema::traverseChoiceSequence+0x208 ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#12 0xd6ca519c in
> > > >xercesc_2_7::TraverseSchema::processComplexContent+0x2ec ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#13 0xd6c86d88 in
> > > >xercesc_2_7::TraverseSchema::traverseComplexTypeDecl+0x1250 ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#14 0xd6ca26d0 in
> > > >xercesc_2_7::TraverseSchema::getElementComplexTypeInfo+0x810 ()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#15 0xd6c90414 in
> > > >xercesc_2_7::TraverseSchema::traverseElementDecl+0xf04
> > > >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#16 0xd6c9e550 in
> > > >xercesc_2_7::TraverseSchema::processChildren+0xcd8
> >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#17 0xd6c7f034 in
> > > >xercesc_2_7::TraverseSchema::doTraverseSchema+0x24
> >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#18 0xd6c7ebf4 in
> > > >xercesc_2_7::TraverseSchema::TraverseSchema+0x390
> > > >() from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#19 0xd6c053e8 in
> > > >xercesc_2_7::IGXMLScanner::resolveSchemaGrammar+0x988
> > > >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#20 0xd6c0472c in
> > > >xercesc_2_7::IGXMLScanner::parseSchemaLocation+0x12c
> > > >()
> > > >    from /intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#21 0xd6bfc0fc in xercesc_2_7::IGXMLScanner::scanStartTagNS+0x35c
> > > >() from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#22 0xd6bf8248 in xercesc_2_7::IGXMLScanner::scanContent+0x1b8 ()

> > > >from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#23 0xd6bf5588 in xercesc_2_7::IGXMLScanner::scanDocument+0x100
> > > >() from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#24 0xd6c52454 in xercesc_2_7::SAXParser::parse+0x17c () from
> > > >
> > > >/intasDEV/intas/Xerces/2.7/lib/libxerces-c.sl.27
> > > >#25 0x5bd7a0 in XMResponseParser::validateMsgBuffer
> > > >(this=0x7788f155,
> > > >
> > > >schemaLoc=0x7788af14 "") at XMResponseParser.cc:119
> > > >
> > > >Thanks & Regards,
> > > >Sasikumar Kandhasamy
> > > >
> > > >Mobile:- +91 9986378586
> > > >
> > > >"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J 
> > > >Abdul
>
> > > >Kalam
> > > >
> > > >
> > > >
> >
> >
> >
> >The information contained in this electronic message and any 
> >attachments to this message are intended for the exclusive use of the
> >addressee(s) and may contain proprietary, confidential or privileged 
> >information. If you are not the intended recipient, you should not 
> >disseminate, distribute or copy this e-mail. Please notify the sender

> >immediately and destroy all copies of this message and any
attachments.
> >
> >WARNING: Computer viruses can be transmitted via email. The recipient

> >should check this email and any attachments for the presence of 
> >viruses. The company accepts no liability for any damage caused by 
> >any virus transmitted by this email.
> >
> >www.wipro.com
>
>
>
>The information contained in this electronic message and any 
>attachments to this message are intended for the exclusive use of the
>addressee(s) and may contain proprietary, confidential or privileged 
>information. If you are not the intended recipient, you should not 
>disseminate, distribute or copy this e-mail. Please notify the sender 
>immediately and destroy all copies of this message and any attachments.
>
>WARNING: Computer viruses can be transmitted via email. The recipient 
>should check this email and any attachments for the presence of 
>viruses. The company accepts no liability for any damage caused by any 
>virus transmitted by this email.
>
>www.wipro.com



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
 
www.wipro.com


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
 
www.wipro.com


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Reply via email to