[xsd-users] Seg Fault
Prather, Ryan C SSgt USAF AFSPC SYAG/SED
Ryan.Prather at peterson.af.mil
Mon Feb 4 15:01:02 EST 2008
How would I check to see if the runtime is getting terminated?
Everything was working Wed last week just fine. I moved some files
around and I'm getting an error now.
In order to troubleshoot, I took the threading out, but we will want to
put it back in as soon as I get this figured out.
Ryan
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Monday, February 04, 2008 11:13 AM
To: Prather, Ryan C SSgt USAF AFSPC SYAG/SED
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Seg Fault
Hi Ryan,
Prather, Ryan C SSgt USAF AFSPC SYAG/SED <Ryan.Prather at peterson.af.mil>
writes:
> I am getting a segmentation fault when trying parse a particular
> document. The last executable line is in the following Xerces
> functions:
>
> inline SAX2XMLReader * XMLReaderFactory::createXMLReader(
> MemoryManager *const manager, XMLGrammerPool *const gramPool) {
> return (SAW2XMLReader *)(new (manager)
SAX2XMLReaderImpl(manager,
> gramPool)); }
One fairly common cause of errors that involve memory allocation in
Xerces-C++ is the uninitialized runtime. If you are initializing
it yourself, then can check that it is not terminated before you call
your last parser?
Also, if your application is multi-threaded and you don't initialize the
Xerces-C++ runtime, then you most likely should in order to avoid race
conditions (which could also cause the above error). If you make this
change, also make sure you pass the dont_initialize flag to the
document's parse() functions:
http://codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/#7.
1
Boris
More information about the xsd-users
mailing list