|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
xercesc_2_7::SAXParseException gives a core from destructor ...hi all,
Getting Segmentation fault from * xercesc_2_7::SAXParseException::~SAXParseException () i am using the following code snippnet ... << XERCES_CPP_NAMESPACE::SAXParseException temp(NULL,NULL,NULL,0,0);* />> Calling the below constructor , i am no specifying any memory manager , the intension here is to use the default memory manager ... Request for your view on this .... SAXParseException::SAXParseException ( const XMLCh<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a>*const *message*, const XMLCh<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a>*const *publicId*, const XMLCh<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a>*const *systemId*, const XMLFileLoc<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#dd2d542a6583db767febf57446daa50d> *lineNumber*, const XMLFileLoc<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#dd2d542a6583db767febf57446daa50d> *columnNumber*, MemoryManager<http://xerces.apache.org/xerces-c/apiDocs-3/classMemoryManager.html>*const *manager* = XMLPlatformUtils::fgMemoryManager<http://xerces.apache.org/xerces-c/apiDocs-3/classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252> ) Here is the constructor implementation ... SAXParseException::SAXParseException(const XMLCh* const message , const XMLCh* const publicId , const XMLCh* const systemId , const XMLSSize_t lineNumber , const XMLSSize_t columnNumber , MemoryManager* const manager) : SAXException(message, manager) , fColumnNumber(columnNumber) , fLineNumber(lineNumber) , fPublicId(XMLString::replicate(publicId, manager)) , fSystemId(XMLString::replicate(systemId, manager)) { } Below is the Destructor .. SAXParseException::~SAXParseException() { fMemoryManager->deallocate(fPublicId);//XMLString::release(&fPublicId); fMemoryManager->deallocate(fSystemId);//XMLString::release(&fSystemId); } Thanks Anil |
|
|
Re: xercesc_2_7::SAXParseException gives a core from destructor ...hi,
The Stack trace shows Segmenation fault at Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) where #0 0x00000000 in ?? () #1 0xb7e08837 in xercesc_2_7::SAXParseException::~SAXParseException () at GrammarResolver.hpp:246 #2 0x0804b2da in main () (gdb) Which is the below inline function in GrammarResolver.hpp:246 inline MemoryManager* GrammarResolver::getGrammarPoolMemoryManager() const { return fGrammarPool->getMemoryManager(); } Any idea what could cause this ??? Thanks Anil On Fri, Oct 10, 2008 at 3:40 PM, Anil Tambe <tambe.anil@...> wrote: > hi all, > Getting Segmentation fault from > > * xercesc_2_7::SAXParseException::~SAXParseException () > > i am using the following code snippnet ... > << > XERCES_CPP_NAMESPACE::SAXParseException temp(NULL,NULL,NULL,0,0);* > > />> > > Calling the below constructor , i am no specifying any memory manager , the intension here is to use the default memory manager ... > > Request for your view on this .... > > SAXParseException::SAXParseException ( const XMLCh<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a>*const > *message*, > > const XMLCh<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a>*const > *publicId*, > > const XMLCh<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a>*const > *systemId*, > > const XMLFileLoc<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#dd2d542a6583db767febf57446daa50d> > *lineNumber*, > > const XMLFileLoc<http://xerces.apache.org/xerces-c/apiDocs-3/Xerces__autoconf__config_8msvc_8hpp.html#dd2d542a6583db767febf57446daa50d> > *columnNumber*, > > MemoryManager<http://xerces.apache.org/xerces-c/apiDocs-3/classMemoryManager.html>*const > *manager* = XMLPlatformUtils::fgMemoryManager<http://xerces.apache.org/xerces-c/apiDocs-3/classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252> > > ) > > > > Here is the constructor implementation ... > > > SAXParseException::SAXParseException(const XMLCh* const message > , const XMLCh* const publicId > , const XMLCh* const systemId > , const XMLSSize_t lineNumber > , const XMLSSize_t columnNumber > , MemoryManager* const manager) : > SAXException(message, manager) > , fColumnNumber(columnNumber) > , fLineNumber(lineNumber) > , fPublicId(XMLString::replicate(publicId, manager)) > , fSystemId(XMLString::replicate(systemId, manager)) > { > } > > > > > Below is the Destructor .. > > SAXParseException::~SAXParseException() > { > > fMemoryManager->deallocate(fPublicId);//XMLString::release(&fPublicId); > fMemoryManager->deallocate(fSystemId);//XMLString::release(&fSystemId); > > } > > Thanks > Anil > > > -- Take Care Anil always for_u |
|
|
Re: xercesc_2_7::SAXParseException gives a core from destructor ...Hi Anil,
Anil Tambe <tambe.anil@...> writes: > Any idea what could cause this ??? The most likely cause is the destruction of Xerces-C++ exception after PlatformUtils::Terminate() has been called. Boris -- Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog Open source XML data binding for C++: http://codesynthesis.com/products/xsd Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde |
|
|
Re: xercesc_2_7::SAXParseException gives a core from destructor ...Thanks Boris .. Adding checks for NULL in destructors ( SAXParseException
and SAXException ) resolves the issue. On Mon, Oct 13, 2008 at 12:21 PM, Boris Kolpackov <boris@...>wrote: > Hi Anil, > > Anil Tambe <tambe.anil@...> writes: > > > Any idea what could cause this ??? > > The most likely cause is the destruction of Xerces-C++ exception after > PlatformUtils::Terminate() has been called. > > Boris > > -- > Boris Kolpackov, Code Synthesis Tools > http://codesynthesis.com/~boris/blog<http://codesynthesis.com/%7Eboris/blog> > Open source XML data binding for C++: > http://codesynthesis.com/products/xsd > Mobile/embedded <http://codesynthesis.com/products/xsdMobile/embedded>validating XML parsing: > http://codesynthesis.com/products/xsde > -- Take Care Anil always for_u |
| Free Forum Powered by Nabble | Forum Help |