Thanks Tinny,
I have just downloaded v1.6 and will compile a new DLL and link it in and
see what happens.
I have now discovered another bug, this time with the DOM parser. I am not
sure if it is my code or XERCES so I need to work it a bit more, but
esentially when I call myDOMparser->parse( filename.c_str() ) I get an
exception when running in a seperate thread and the filename is > 8.3
characters long (+ the path name)
ie filename is a VC++(6) string
"c:\qmlmq\xfer\xml\20011224135901-1.xml"
I will be playing with this over the next few days and if you don't hear
anything more about it then it's my problem.
Sid
-----Original Message-----
From: Tinny Ng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 25 December 2001 1:45 AM
To: [EMAIL PROTECTED]
Subject: Re: Xerces and multithreading on Win2K
With Xerces 1.6.0, you can now call XMLPlatformUtils::Initialize() and
XMLPlatformUtils::Terminate() multiple times in a process, and CAN call
XMLPlatformUtils::Initialize() again after calling
XMLPlatformUtils::Terminate() Nth time.
See http://xml.apache.org/xerces-c/faq-parse.html#faq-25 for details.
Tinny
Joachim Achtzehnter wrote:
> Sid wrote:
> >
> > The problem is now fixed but it kept crashing the second time the
> > SAXParser was being created.
> >
> > Chris Prior wrote:
> > >
> > > From initial observations you should not call
> > > XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
> > > multiple times in a process (they should be called once in the whole
> > > process space lifetime). I think this functionality may have been
> > > fixed in 1.6
>
> If I'm not mistaken you can now do the following in 1.6: Call Initialize()
> N times, then call Terminate() (N - 1) times, and things still work. Once
> you call Terminate() for the Nth time you cannot use Xerces features
> anymore. In other words, it behaves like a stack.
>
> Once the last stacked-up Initialize() call is balanced with the
> corresponding Terminate() call it is not possible to properly
> re-initialize Xerces. The reason has to do with global variables that are
> used to record whether certain modules are initialized. Once they are,
> they are never initialized again. The last Terminate() call frees some
> memory, but the global variables continue to point to this freed memory
> resulting in crashes when Xerces is used subsequently.
>
> This is certainly not ideal. It would be better if the final Terminate()
> call returned the system to the same state as before the first
> Initialize(), in which case it would be possible to re-initialize the
> system again.
>
> In the meantime, applications that use parsers repeatedly probably
> shouldn't bother calling Terminate() at all.
>
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]