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 bu...@apache.org on 2001/09/21 22:06:22 UTC
DO NOT REPLY [Bug 3771] New: -
Segmentation Fault on RedHat 7.1
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3771
Segmentation Fault on RedHat 7.1
Summary: Segmentation Fault on RedHat 7.1
Product: Xerces-C++
Version: 1.5.1
Platform: Other
OS/Version: Linux
Status: NEW
Severity: Blocker
Priority: Other
Component: Samples/Tests
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: iguy@ionsphere.org
When I compile the source code on RedHat 7.1 using gcc 2.96-85 and then run the
resulting binary, it seg faults. This is on any of the samples included with
the 1.5.1 source code. However if I download the pre-packaged binaries it works
fine for the binaries supplied but any new compiled programs die with the same
error.
--- Here is the sample program I'm trying to run
#include <iostream>
#include <util/PlatformUtils.hpp>
#include <sax2/SAX2XMLReader.hpp>
#include <sax2/XMLReaderFactory.hpp>
#include <sax2/DefaultHandler.hpp>
int main (int argc, char* args[]) {
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch) {
cout << "Error during initialization! :\n"
<< toCatch.getMessage() << "\n";
return 1;
}
char* xmlFile = "x1.xml";
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
ContentHandler* contentHandler = new DefaultHandler();
ErrorHandler* errHandler = (ErrorHandler*) contentHandler;
parser->setContentHandler(contentHandler);
parser->setErrorHandler(errHandler);
try {
parser->parse(xmlFile);
}
catch (const XMLException& toCatch) {
cout << "\nFile not found: '" << xmlFile << "'\n"
<< "Exception message is: \n"
<< toCatch.getMessage() << "\n" ;
return -1;
}
}
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
--- Here is the command line used
g++ -I${XERCESCROOT}/include -L${XERCESCROOT}/lib -lxerces-c1_5_1 -fpic
-D_REENTRANT -lc main.cpp
--- Here is the stack trace gdb run "gdb a.out core" then bt
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org