osdir.com
mailing list archive

Subject: Re: Core dump with XMLReaderFactory::createXMLReader() - SOLVED - msg#00077

List: text.xml.xerces-c.user

Date: Prev Next Index Thread: Prev Next Index
Stephen Collyer wrote:
> 1. I'm getting a core dump in the constructor of a class
> XMLParser which is initializing a ptr to a SAX2XMLReader
> member variable declared like this:

OK, panic over folks. I was failing to initialize
Xerces in the offending executable. It all works
now.

--
Regards

Steve Collyer
Netspinner Ltd



Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Core dump with XMLReaderFactory::createXMLReader()

1. I'm getting a core dump in the constructor of a class XMLParser which is initializing a ptr to a SAX2XMLReader member variable declared like this: > private: > > std::auto_ptr<SAX2XMLReader> parser_; The constructor does this: > XMLParser::XMLParser() > : parser_(XMLReaderFactory::createXMLReader()) > { 2. I have compiled and run test code which uses the XMLParser class without problem. However, a new executable is consistently dumping core with the following message: > mdp_agent_exe: XMemory.cpp:62: static void* xercesc_2_7::XMemory::operator > new(size_t, xercesc_2_7::MemoryManager*): Assertion `manager != 0' failed 3. The backtrace from gdb is: > #0 0xffffe410 in __kernel_vsyscall () > #1 0xb69498f5 in raise () from /lib/libc.so.6 > #2 0xb694b1e1 in abort () from /lib/libc.so.6 > #3 0xb6942c1e in __assert_fail () from /lib/libc.so.6 > #4 0xb6f10279 in xercesc_2_7::XMemory::operator new () from > /usr/lib/libxerces-c.so.27 > #5 0xb711cbb0 in xercesc_2_7::XMLReaderFactory::createXMLReader > (manager=0x0, gramPool=0x0) at > /usr/include/xercesc/sax2/XMLReaderFactory.hpp:66 > #6 0xb7119864 in XMLParser (this=0xbfb032a4) at > /code/mdp_qt/src/lib/XMLParser.cpp:32 which seems to point the finger firmly at createXMLReader(), though I have no idea what's going on in detail. Does anyone have any idea what's causing this ? I can see no significant difference between the exe that works and the one that dumps core. -- Regards Steve Collyer Netspinner Ltd

Next Message by Date: click to view message preview

Re: Core dump with XMLReaderFactory::createXMLReader()

Hey Stephen! Funny seeing you post on the c-user list these days!! Defector! :-) 2008/5/23 Stephen Collyer <scollyer@xxxxxxxxxxxxxxxx>: > 2. I have compiled and run test code which uses the > XMLParser class without problem. However, a new executable > is consistently dumping core with the following message: > >> mdp_agent_exe: XMemory.cpp:62: static void* xercesc_2_7::XMemory::operator >> new(size_t, xercesc_2_7::MemoryManager*): Assertion `manager != 0' failed [snip] >> #5 0xb711cbb0 in xercesc_2_7::XMLReaderFactory::createXMLReader >> (manager=0x0, gramPool=0x0) at >> /usr/include/xercesc/sax2/XMLReaderFactory.hpp:66 Well, createXMLReader() is getting called without a memory manager - so it is before this that the problem lies. It looks like something is wrong in your XMLParser() code - you may have to show us that. But I'm not a *real* Xerces-C programmer - so maybe someone else can see the problem right away? Cheers, jas.

Previous Message by Thread: click to view message preview

Core dump with XMLReaderFactory::createXMLReader()

1. I'm getting a core dump in the constructor of a class XMLParser which is initializing a ptr to a SAX2XMLReader member variable declared like this: > private: > > std::auto_ptr<SAX2XMLReader> parser_; The constructor does this: > XMLParser::XMLParser() > : parser_(XMLReaderFactory::createXMLReader()) > { 2. I have compiled and run test code which uses the XMLParser class without problem. However, a new executable is consistently dumping core with the following message: > mdp_agent_exe: XMemory.cpp:62: static void* xercesc_2_7::XMemory::operator > new(size_t, xercesc_2_7::MemoryManager*): Assertion `manager != 0' failed 3. The backtrace from gdb is: > #0 0xffffe410 in __kernel_vsyscall () > #1 0xb69498f5 in raise () from /lib/libc.so.6 > #2 0xb694b1e1 in abort () from /lib/libc.so.6 > #3 0xb6942c1e in __assert_fail () from /lib/libc.so.6 > #4 0xb6f10279 in xercesc_2_7::XMemory::operator new () from > /usr/lib/libxerces-c.so.27 > #5 0xb711cbb0 in xercesc_2_7::XMLReaderFactory::createXMLReader > (manager=0x0, gramPool=0x0) at > /usr/include/xercesc/sax2/XMLReaderFactory.hpp:66 > #6 0xb7119864 in XMLParser (this=0xbfb032a4) at > /code/mdp_qt/src/lib/XMLParser.cpp:32 which seems to point the finger firmly at createXMLReader(), though I have no idea what's going on in detail. Does anyone have any idea what's causing this ? I can see no significant difference between the exe that works and the one that dumps core. -- Regards Steve Collyer Netspinner Ltd

Next Message by Thread: click to view message preview

Re: Core dump with XMLReaderFactory::createXMLReader() - SOLVED

Hey Stephen, 2008/5/23 Stephen Collyer <scollyer@xxxxxxxxxxxxxxxx>: > OK, panic over folks. I was failing to initialize > Xerces in the offending executable. It all works > now. Hah! that would do it - no initialization - no default memory manager... Cheers, jas.
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by