Hi Jeetu,

Where can I get some more information on the memory management issue in Xerces.
Have you posted it somewhere ??

Thanks for your reply to my query.

Nikita

[EMAIL PROTECTED] wrote:

 When one calls the getDocument() on a parser instance, one is getting back a reference to the DOM_Document member of the parser. And since Xerces has a reference counting mechanism, your document reference should be fine even if your parser instance goes out of scope. (people, correct me if I am wrong here). As for the other question on having multiple instances of the parser in one thread -- this should be ok as well. I am doing similar things on Solaris but am using Xerces 1.4 ...... and here's my experience. I had a test code in which I was creating a parser instance in a for loop. And the test code failed (I had posted a detailed info about it to the list in reply to your first post). There appears to be some memory management problem within Xerces. But the good news is that Xerces has come up with the IDOM classes which does not do all the memory management that DOM classes do (but I have not tried them yet but will be doing soon).Hope that helps,JeetuIn the code above parser goes out of scope after the constructor executes, however we do
have the document variable which is used later. Will this cause problems ?? Also will having multiple instances of the
parser in one thread cause problems ??
When I ran our server in a Debugger, here is what I got (stack trace):

 I get a signal BUS (invalid address alignment) in NamedNodeMapImpl::removeAll at line 145 in file "NamedNodeMapImpl.cpp" error.

  ThreadBootStrap(0x626740, 0xfdee3d18, 0x0, 0x5, 0x1, 0xfe401000)
   NSWrkThread::Run(0x626740, 0x0, 0x0, 0x0, 0x0, 0x0)
   ECXParse::Process(this = 0x6c97c0, pkt = 0x6a1638)
   ECXParse::parseFile(this = 0x6c97c0)
   CustomParserImpl::parse(this = 0xfc70570c, pRdr = 0x6a5790)
   EcxXmlProcessor::parse(0x798b58, 0xfc705664, 0xfc705664, 0x798b58, 0x0, 0xfc7055e0)
   EcxStyleSheets::~EcxStyleSheets(this = 0x6f7e78, delete = 3)
   DOM_Document::~DOM_Document(this = 0x6f7e7c, delete = 2)
   DOM_Node::~DOM_Node(this = 0x6f7e7c, delete = 0)
   RefCountedImpl::removeRef(thisNode = 0x6a5cb0)
   DocumentImpl::unreferenced(this = 0x6a5cb0)
   NodeImpl::deleteIf(thisNode = 0x6a5cb0)
   NodeImpl::deleteIf(thisNode = 0x757c30)
   NodeImpl::deleteIf(thisNode = 0x767d90)
   NodeImpl::deleteIf(thisNode = 0x703960)
   ElementImpl::~ElementImpl(this = 0x703960, delete = 3)
   NamedNodeMapImpl::removeAll(this = 0x6952d8)

I have been working on this issue for quite a while ..

Any kind of help is highly appreciated

Thanks,
Nikita

Dean Roddey wrote:

I would definitely install the patch. If I remember correctly, we had
exactly that problem during testing where it would run forever in a MT test
on a single CPU machine, but would crash on a multi-CPU machine.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com

"Why put off until tomorrow what you can
put off until the day after tomorrow?"

----- Original Message -----
From: "Nikita Sawant" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 04, 2001 6:25 PM
Subject: Re: Xerces 1.2.0

> Hi Dean,
>
> Thank you for the prompt reply.
>
> I have a single parser instance per thread. I do not have the
> patch 105591 installed on my single CPU machine, however
> the multi threaded application runs fine. It crashes  on a multiple CPU
> machine (Solaris OS version 2.8).  Will installing the patch 105591
> help in this case ??
>
> Thanks,
> Nikita
>
>
> Dean Roddey wrote:
>
> > How are you distributing parser instances and threads? The FAQ spells
out
> > the things you have to be careful of in a multi-threaded application.
Have
> > you read the FAQ on this subject?
> >
> > --------------------------
> > Dean Roddey
> > The CIDLib C++ Frameworks
> > Charmed Quark Software
> > [EMAIL PROTECTED]
> > http://www.charmedquark.com
> >
> > "Why put off until tomorrow what you can
> > put off until the day after tomorrow?"
> >
> > ----- Original Message -----
> > From: "Nikita Sawant" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, June 04, 2001 5:28 PM
> > Subject: Xerces 1.2.0
> >
> > > Hi,
> > >
> > > We use Xerces 1.2.0 in our multithreaded server. The server crashes if
> > > we
> > > run it on a multi-cpu solaris machine, it runs fine if we run it on a
> > > single CPU machine.
> > >
> > > Am I missing something when I compile the xerces library ?? Has Xerces
> > > been tested to
> > > run on multi-cpu machines ??
> > >
> > > Thanks,
> > > Nikita
> > >
> > >
> > >
> >
>
> --------------------------------------------------------------------------
--
> > ----
> >
> > > ---------------------------------------------------------------------
> > > 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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

begin:vcard 
n:Sawant;Nikita 
x-mozilla-html:FALSE
org:iPlanet Group
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Nikita Sawant
end:vcard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to