[EMAIL PROTECTED] you wrote:
>
> I have re-engineered a VC++(6) application to a multithreaded design and now
> find that calls to xerces functions (v1.5) crash.
>
> The thread sits and monitors a directory for XML file and then creates an
> object (CStateMachine) to process the file (the file is represented as a
> CDataFile object in the code below).
>
> The first XML file collected and processed seams to work, then the
> (CStateMachine) object is destoryed, but when the second attempt is made to
> create the object, the application crashs when it goes to creae a new
> SAXParser object.
>
> bool CStateMachine::CommandProcess(CDataFile *pDF)
> {
> ...
> XMLPlatformUtils::Initialize();
> ...
> XMLPlatformUtils::Terminate();
> ...
> }
In Xerces 1.5 the Terminate() function (maybe also Initialize?) must be
called at most once per process. After a process has called Terminate()
you can no longer use Xerces in this process.
Joachim
--
work: [EMAIL PROTECTED] (http://www.netacquire.com)
private: [EMAIL PROTECTED] (http://www.kraut.ca)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]