You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Markus Jais <da...@gmx.net> on 2004/04/26 16:43:51 UTC
seg fault with XMLReaderFactory
hi
this is my code
cout << "0" << endl;
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
cout << "1" << endl;
the output is:
0
Segmentation fault
I have xerces 2.2 on a linux system.
gdb says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 12631)]
0x401c5f59 in XMLMutex::lock () from /usr/local/lib/libxerces-c.so.22
(gdb) where
#0 0x401c5f59 in XMLMutex::lock () from /usr/local/lib/libxerces-c.so.22
#1 0x4024ccff in gScannerMutex () from /usr/local/lib/libxerces-c.so.22
#2 0x4024f0d0 in XMLScanner::commonInit () from
/usr/local/lib/libxerces-c.so.22
#3 0x4024d1a1 in XMLScanner::XMLScanner () from
/usr/local/lib/libxerces-c.so.22
#4 0x401b0805 in IGXMLScanner::IGXMLScanner () from
/usr/local/lib/libxerces-c.so.22
#5 0x402523f1 in XMLScannerResolver::getDefaultScanner () from
/usr/local/lib/libxerces-c.so.22
#6 0x401f45d1 in SAX2XMLReaderImpl::initialize () from
/usr/local/lib/libxerces-c.so.22
#7 0x401f42cf in SAX2XMLReaderImpl::SAX2XMLReaderImpl () from
/usr/local/lib/libxerces-c.so.22
#8 0x08049ee5 in AccessConfig::AccessConfig (this=0xbfffe4a8,
fileName=0xbfffe49c)
at /usr/local/include/xercesc/sax2/XMLReaderFactory.hpp:113
#9 0x0804979a in AccessConfig::AccessConfig (this=0xbfffe588) at
AccessConfig.cc:31
#10 0x0804a39a in main () at AccessConfig.cc:54
any ideas what is wrong here ?
markus
--
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: seg fault with XMLReaderFactory
Posted by Alberto Massari <am...@progress.com>.
Hi Markus,
you have not called XMLPlatformUtils::Initialize
Alberto
At 16.43 26/04/2004 +0200, Markus Jais wrote:
>hi
>this is my code
>
>cout << "0" << endl;
>SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
>cout << "1" << endl;
>
>
>the output is:
>0
>Segmentation fault
>
>
>I have xerces 2.2 on a linux system.
>gdb says:
>Program received signal SIGSEGV, Segmentation fault.
>[Switching to Thread 1024 (LWP 12631)]
>0x401c5f59 in XMLMutex::lock () from /usr/local/lib/libxerces-c.so.22
>(gdb) where
>#0 0x401c5f59 in XMLMutex::lock () from /usr/local/lib/libxerces-c.so.22
>#1 0x4024ccff in gScannerMutex () from /usr/local/lib/libxerces-c.so.22
>#2 0x4024f0d0 in XMLScanner::commonInit () from
>/usr/local/lib/libxerces-c.so.22
>#3 0x4024d1a1 in XMLScanner::XMLScanner () from
>/usr/local/lib/libxerces-c.so.22
>#4 0x401b0805 in IGXMLScanner::IGXMLScanner () from
>/usr/local/lib/libxerces-c.so.22
>#5 0x402523f1 in XMLScannerResolver::getDefaultScanner () from
>/usr/local/lib/libxerces-c.so.22
>#6 0x401f45d1 in SAX2XMLReaderImpl::initialize () from
>/usr/local/lib/libxerces-c.so.22
>#7 0x401f42cf in SAX2XMLReaderImpl::SAX2XMLReaderImpl () from
>/usr/local/lib/libxerces-c.so.22
>#8 0x08049ee5 in AccessConfig::AccessConfig (this=0xbfffe4a8,
>fileName=0xbfffe49c)
> at /usr/local/include/xercesc/sax2/XMLReaderFactory.hpp:113
>#9 0x0804979a in AccessConfig::AccessConfig (this=0xbfffe588) at
>AccessConfig.cc:31
>#10 0x0804a39a in main () at AccessConfig.cc:54
>
>
>
>
>any ideas what is wrong here ?
>
>markus
>
>
>
>
>
>--
>"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
>Jetzt aktivieren unter http://www.gmx.net/info
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org