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 Tony Wuebben <wu...@lexis-nexis.com> on 2000/10/12 13:59:43 UTC

Entity Reference cleanup dumping core

I am using the stable release of Ver 1.3 of XERCES C++ and I have expand
Entity Reference set to on at parse time.  The problem I am seeing is
that when I remove an element from a tree (which removes it's entire
subbranch).  If this 'remove' removes the last occurance in the document
of any entity reference you will get a core dump upon cleanup. Any help
would be appreciated. I've include a description of what purify in
stating. If you need a sample progran and data please let me know.

Thanks
Tony Wuebben

 
Here is what purify had to say:

      Purify instrumented
/project/tpf95/nfd/build98/xtrem/xtremnfd0400/work/xtrem000000/s-branch/src/
progxtreme/xtreme (pid 7442 at Tue Oct 10 11:09:33 2000)
      UMR: Uninitialized memory read
      UMR: Uninitialized memory read
      UMR: Uninitialized memory read (38 times)
      ZPR: Zero page read
      This is occurring while in:
            ParentNode::cloneChildren(const NodeImpl&)
[libxerces-c1_3.so]
            EntityImpl::getFirstChild(void) [libxerces-c1_3.so]
            static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
            NamedNodeMapImpl::removeAll(void) [libxerces-c1_3.so]
            DocumentTypeImpl::~DocumentTypeImpl(void)
[libxerces-c1_3.so]
            static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
      Reading 2 bytes from 0xa0
      SIG: Signal handled
      This is occurring while in:
            ParentNode::cloneChildren(const NodeImpl&)
[libxerces-c1_3.so]
            EntityImpl::getFirstChild(void) [libxerces-c1_3.so]
            static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
            NamedNodeMapImpl::removeAll(void) [libxerces-c1_3.so]
            DocumentTypeImpl::~DocumentTypeImpl(void)
[libxerces-c1_3.so]
            static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
      Received signal 11 (SIGSEGV - Segmentation Fault)
      Faulting address = 0xa0
      Signal mask: (SIGSEGV) 
      Pending signals: 
      COR: Fatal core dump
      This is occurring while in:
            _p955static    [crtn.o]
            abort          [libc.so.1]
            signalHandler::handler(int) [libnfd.a]
            sigacthandler  [sigaction.c]
            pure_signal_handler_wrapper [rtlib.o]
            pure_sigtramp  [rtlib.o]
      Received signal 6 (SIGABRT - Abort)
      Signal mask: (SIGSEGV) 
      Pending signals:

Re: Entity Reference cleanup dumping core

Posted by Dennis Gearon <ge...@OIT.EDU>.
Just exactly what IS an entity?

Tony Wuebben wrote:
> 
> I am using the stable release of Ver 1.3 of XERCES C++ and I have expand
> Entity Reference set to on at parse time.  The problem I am seeing is
> that when I remove an element from a tree (which removes it's entire
> subbranch).  If this 'remove' removes the last occurance in the document
> of any entity reference you will get a core dump upon cleanup. Any help
> would be appreciated. I've include a description of what purify in
> stating. If you need a sample progran and data please let me know.
> 
> Thanks
> Tony Wuebben
> 
> 
> Here is what purify had to say:
> 
>       Purify instrumented
> /project/tpf95/nfd/build98/xtrem/xtremnfd0400/work/xtrem000000/s-branch/src/
> progxtreme/xtreme (pid 7442 at Tue Oct 10 11:09:33 2000)
>       UMR: Uninitialized memory read
>       UMR: Uninitialized memory read
>       UMR: Uninitialized memory read (38 times)
>       ZPR: Zero page read
>       This is occurring while in:
>             ParentNode::cloneChildren(const NodeImpl&)
> [libxerces-c1_3.so]
>             EntityImpl::getFirstChild(void) [libxerces-c1_3.so]
>             static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
>             NamedNodeMapImpl::removeAll(void) [libxerces-c1_3.so]
>             DocumentTypeImpl::~DocumentTypeImpl(void)
> [libxerces-c1_3.so]
>             static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
>       Reading 2 bytes from 0xa0
>       SIG: Signal handled
>       This is occurring while in:
>             ParentNode::cloneChildren(const NodeImpl&)
> [libxerces-c1_3.so]
>             EntityImpl::getFirstChild(void) [libxerces-c1_3.so]
>             static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
>             NamedNodeMapImpl::removeAll(void) [libxerces-c1_3.so]
>             DocumentTypeImpl::~DocumentTypeImpl(void)
> [libxerces-c1_3.so]
>             static NodeImpl::deleteIf(NodeImpl*) [libxerces-c1_3.so]
>       Received signal 11 (SIGSEGV - Segmentation Fault)
>       Faulting address = 0xa0
>       Signal mask: (SIGSEGV)
>       Pending signals:
>       COR: Fatal core dump
>       This is occurring while in:
>             _p955static    [crtn.o]
>             abort          [libc.so.1]
>             signalHandler::handler(int) [libnfd.a]
>             sigacthandler  [sigaction.c]
>             pure_signal_handler_wrapper [rtlib.o]
>             pure_sigtramp  [rtlib.o]
>       Received signal 6 (SIGABRT - Abort)
>       Signal mask: (SIGSEGV)
>       Pending signals:
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

-- 
________________________________________________________________
Dennis K. Gearon (Kegley)                           Loyal Member
Scientific Instrument Technician, School of ETM       of The 
Oregon Institute of Technology                       Order of
- One of USA's Best College Buys                       TUX
3201 Campus Drive                             ~
Klamath Falls, OR 97601                      'v'    standards
Voice   1-541-885-1563                      // \\   corrupters:
FAX     1-541-885-1689                     /(   )\   ^phear^
email   gearond@oit.edu                     ^`~'^   the penguin 
________________________________________________________________
Happiness is when you want to go to your job in the morning and 
when you want to go home in the evening.
________________________________________________________________

DOM_Nodes

Posted by Dennis Gearon <ge...@OIT.EDU>.
The fm says that nodes should not be newed and stored in other
containers. Aren't they ref counted? Would this even be a good idea
considering the dynamic contents of DOM Document under editing? It would
speed up applications using xerces if they could be passed as references
or pointers.
-- 
________________________________________________________________
Dennis K. Gearon (Kegley)                           Loyal Member
Scientific Instrument Technician, School of ETM       of The 
Oregon Institute of Technology                       Order of
- One of USA's Best College Buys                       TUX
3201 Campus Drive                             ~
Klamath Falls, OR 97601                      'v'    standards
Voice   1-541-885-1563                      // \\   corrupters:
FAX     1-541-885-1689                     /(   )\   ^phear^
email   gearond@oit.edu                     ^`~'^   the penguin 
________________________________________________________________
Happiness is when you want to go to your job in the morning and 
when you want to go home in the evening.
________________________________________________________________

RE: Entity Reference cleanup dumping core

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

        you are right this piece of C++ code and buserr.xml produces access
violation on Windows/NT.
When I run it through MSIE5.01 or DOMPrint 1.3.0.  it works just fine.

Hope this helps

      Rado

> Update:
>
> I have come to the conclusion that if you delete the last entity
> reference of a type, XERCES will dump core when the tree's destructor is
> called. If I have Entity Ref. &copy; in the code 3 times and I delete
> the last occurence of this Entity Ref. (via deleteing it's parent)
> XERCES dumps core during claenup. If I delete the first or second one
> everything is fine.
>
> I've include a new main.C (original did not delete the last node, bitten
> by iterating & deleting over a NodeList again). Also including the DTD
> and 2 XML files one that works and one that generates a bus error at
> cleanup.
>
> We have gotten around this problem by exiting our program before the Dom
> Tree goes out of scope.
>
> Thanks again
> Tony Wuebben
>
>
>
> Arundhati Bhowmick wrote:
> >
> > I did try your tests and you're right in the entity-reference
> call. I feel in his
> > (Tony's) case it should've given an error instead of dump. I was
> thinking of
> > fixing that up but am moving to another site today so can't spend time on
> > dubugging it. Although the alternative for Tony is to rectify the
> > entity-reference call and move ahead. If someone can find a fix
> for this that'd
> > be great. Till then I'll put it on our to-do list.
> > Thanks,
> > Arundhati
> >
> > Radovan Chytracek wrote:
> >
> > > > The reason it was dumping core was my sample XML file was in error and
> > > > the test program was not catching parser exceptions.
> > > >
> > > > My engineer team is still reporting the core dumping when
> removing the a
> > > > child that contains the last entity-reference of a specific
> type, I can
> > > > get it dump core work with my new improved sample program using their
> > > > DTD and XML file. Their DTD and XML file is huge, so I will
> try to strip
> > > > out most of it this week-end to figure out what is truly the problem.
> > >
> > > Hello,
> > >
> > >     If I remember correctly one of the errors in the DTD/XML
> files you sent
> > > was that you defined an enitity as:
> > >
> > > <!ENTITY foo "enitity foo">
> > >
> > > but in the XML files it has been used as:
> > >
> > > <tag>
> > >   <innertag> %foo;</innertag>
> > > </tag>
> > >
> > > which is incorrect. (it should be &foo; )
> > >
> > > Before I went to the C++ code I ran your XML test file through
> DOMPrint and
> > > SAXPrint example in AutoValidate  mode to catch a possible error there.
> > >
> > > I think this could lead to core dump since DOM parser doesn't know that
> > > this is an entity and doesn't create its corresponding node (I
> think a text
> > > node(s) is created instead).
> > > So if you try to delete it there is simply nothing like entity
> reference node
> > > and can cause the core dump to be produced.
> > > May be turning validation ON could help to locate the invalid entity
> > > references in your XML file(s).
> > >
> > > Please correct me if you thing this explanation is wrong at some point.
> > >
> > > This is what I saw using MSIE 5.01, DOMPrint and SAXPrint
> > >
> > > <?xml version="1.0" encoding="UTF-8" ?>
> > > <bar>
> > >   <inbar>%foo;</inbar>
> > > </bar>
> > >
> > > It looks like text node has been seen by parsers and not an
> entity reference,
> > > even if the validation is explicitly set to validate ALWAYS.
> > >
> > > Rado
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> > --
> >
> > Arundhati Bhowmick
> > IBM -- XML Technology Group (Silicon Valley)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Entity Reference cleanup dumping core

Posted by Tony Wuebben <wu...@lexis-nexis.com>.
Update:

I have come to the conclusion that if you delete the last entity
reference of a type, XERCES will dump core when the tree's destructor is
called. If I have Entity Ref. &copy; in the code 3 times and I delete
the last occurence of this Entity Ref. (via deleteing it's parent)
XERCES dumps core during claenup. If I delete the first or second one
everything is fine.

I've include a new main.C (original did not delete the last node, bitten
by iterating & deleting over a NodeList again). Also including the DTD
and 2 XML files one that works and one that generates a bus error at
cleanup.

We have gotten around this problem by exiting our program before the Dom
Tree goes out of scope.

Thanks again
Tony Wuebben



Arundhati Bhowmick wrote:
> 
> I did try your tests and you're right in the entity-reference call. I feel in his
> (Tony's) case it should've given an error instead of dump. I was thinking of
> fixing that up but am moving to another site today so can't spend time on
> dubugging it. Although the alternative for Tony is to rectify the
> entity-reference call and move ahead. If someone can find a fix for this that'd
> be great. Till then I'll put it on our to-do list.
> Thanks,
> Arundhati
> 
> Radovan Chytracek wrote:
> 
> > > The reason it was dumping core was my sample XML file was in error and
> > > the test program was not catching parser exceptions.
> > >
> > > My engineer team is still reporting the core dumping when removing the a
> > > child that contains the last entity-reference of a specific type, I can
> > > get it dump core work with my new improved sample program using their
> > > DTD and XML file. Their DTD and XML file is huge, so I will try to strip
> > > out most of it this week-end to figure out what is truly the problem.
> >
> > Hello,
> >
> >     If I remember correctly one of the errors in the DTD/XML files you sent
> > was that you defined an enitity as:
> >
> > <!ENTITY foo "enitity foo">
> >
> > but in the XML files it has been used as:
> >
> > <tag>
> >   <innertag> %foo;</innertag>
> > </tag>
> >
> > which is incorrect. (it should be &foo; )
> >
> > Before I went to the C++ code I ran your XML test file through DOMPrint and
> > SAXPrint example in AutoValidate  mode to catch a possible error there.
> >
> > I think this could lead to core dump since DOM parser doesn't know that
> > this is an entity and doesn't create its corresponding node (I think a text
> > node(s) is created instead).
> > So if you try to delete it there is simply nothing like entity reference node
> > and can cause the core dump to be produced.
> > May be turning validation ON could help to locate the invalid entity
> > references in your XML file(s).
> >
> > Please correct me if you thing this explanation is wrong at some point.
> >
> > This is what I saw using MSIE 5.01, DOMPrint and SAXPrint
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <bar>
> >   <inbar>%foo;</inbar>
> > </bar>
> >
> > It looks like text node has been seen by parsers and not an entity reference,
> > even if the validation is explicitly set to validate ALWAYS.
> >
> > Rado
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> --
> 
> Arundhati Bhowmick
> IBM -- XML Technology Group (Silicon Valley)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

Re: Entity Reference cleanup dumping core

Posted by Arundhati Bhowmick <bh...@jtcsv.com>.
I did try your tests and you're right in the entity-reference call. I feel in his
(Tony's) case it should've given an error instead of dump. I was thinking of
fixing that up but am moving to another site today so can't spend time on
dubugging it. Although the alternative for Tony is to rectify the
entity-reference call and move ahead. If someone can find a fix for this that'd
be great. Till then I'll put it on our to-do list.
Thanks,
Arundhati

Radovan Chytracek wrote:

> > The reason it was dumping core was my sample XML file was in error and
> > the test program was not catching parser exceptions.
> >
> > My engineer team is still reporting the core dumping when removing the a
> > child that contains the last entity-reference of a specific type, I can
> > get it dump core work with my new improved sample program using their
> > DTD and XML file. Their DTD and XML file is huge, so I will try to strip
> > out most of it this week-end to figure out what is truly the problem.
>
> Hello,
>
>     If I remember correctly one of the errors in the DTD/XML files you sent
> was that you defined an enitity as:
>
> <!ENTITY foo "enitity foo">
>
> but in the XML files it has been used as:
>
> <tag>
>   <innertag> %foo;</innertag>
> </tag>
>
> which is incorrect. (it should be &foo; )
>
> Before I went to the C++ code I ran your XML test file through DOMPrint and
> SAXPrint example in AutoValidate  mode to catch a possible error there.
>
> I think this could lead to core dump since DOM parser doesn't know that
> this is an entity and doesn't create its corresponding node (I think a text
> node(s) is created instead).
> So if you try to delete it there is simply nothing like entity reference node
> and can cause the core dump to be produced.
> May be turning validation ON could help to locate the invalid entity
> references in your XML file(s).
>
> Please correct me if you thing this explanation is wrong at some point.
>
> This is what I saw using MSIE 5.01, DOMPrint and SAXPrint
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <bar>
>   <inbar>%foo;</inbar>
> </bar>
>
> It looks like text node has been seen by parsers and not an entity reference,
> even if the validation is explicitly set to validate ALWAYS.
>
> Rado
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

--


Arundhati Bhowmick
IBM -- XML Technology Group (Silicon Valley)



RE: Entity Reference cleanup dumping core

Posted by Radovan Chytracek <Ra...@cern.ch>.
> The reason it was dumping core was my sample XML file was in error and
> the test program was not catching parser exceptions.
>
> My engineer team is still reporting the core dumping when removing the a
> child that contains the last entity-reference of a specific type, I can
> get it dump core work with my new improved sample program using their
> DTD and XML file. Their DTD and XML file is huge, so I will try to strip
> out most of it this week-end to figure out what is truly the problem.

Hello,

    If I remember correctly one of the errors in the DTD/XML files you sent
was that you defined an enitity as:

<!ENTITY foo "enitity foo">

but in the XML files it has been used as:

<tag>
  <innertag> %foo;</innertag>
</tag>

which is incorrect. (it should be &foo; )

Before I went to the C++ code I ran your XML test file through DOMPrint and
SAXPrint example in AutoValidate  mode to catch a possible error there.

I think this could lead to core dump since DOM parser doesn't know that
this is an entity and doesn't create its corresponding node (I think a text
node(s) is created instead).
So if you try to delete it there is simply nothing like entity reference node
and can cause the core dump to be produced.
May be turning validation ON could help to locate the invalid entity
references in your XML file(s).

Please correct me if you thing this explanation is wrong at some point.

This is what I saw using MSIE 5.01, DOMPrint and SAXPrint

<?xml version="1.0" encoding="UTF-8" ?>
<bar>
  <inbar>%foo;</inbar>
</bar>

It looks like text node has been seen by parsers and not an entity reference,
even if the validation is explicitly set to validate ALWAYS.

Rado


Re: Entity Reference cleanup dumping core

Posted by Tony Wuebben <wu...@lexis-nexis.com>.
The reason it was dumping core was my sample XML file was in error and
the test program was not catching parser exceptions. 

My engineer team is still reporting the core dumping when removing the a
child that contains the last entity-reference of a specific type, I can
get it dump core work with my new improved sample program using their
DTD and XML file. Their DTD and XML file is huge, so I will try to strip
out most of it this week-end to figure out what is truly the problem.


Thanks for your help. 


Dennis Gearon wrote:
> 
> It still shouldn't core dump, right?
> 
> Radovan Chytracek wrote:
> >
> > Hi,
> >
> >           I have tested your program on Windows/NT 4.0 SP6, MSVC++ 6.0 SP3,
> > Xerces-C 1.3.0/Win32Debug.
> >
> > You had a few errors in the test1.xml itself + something in the code. I attach
> > the C++ code, DTD and XML working for me.
> >
> > --
> > Radovan Chytracek                     LHCb experiment at CERN
> > e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/~chytrace
> > phone:  +41 22 76 72486
> >
> >   ------------------------------------------------------------------------
> >                   Name: grandpa.dtd
> >    grandpa.dtd    Type: text/xml
> >               Encoding: quoted-printable
> >
> >                 Name: main1.cpp
> >    main1.cpp    Type: C++ Source File (application/x-unknown-content-type-C++ Source File)
> >             Encoding: quoted-printable
> >
> >                  Name: test11.xml
> >    test11.xml    Type: text/xml
> >              Encoding: quoted-printable
> >
> >   ------------------------------------------------------------------------
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> --
> ________________________________________________________________
> Dennis K. Gearon (Kegley)                           Loyal Member
> Scientific Instrument Technician, School of ETM       of The
> Oregon Institute of Technology                       Order of
> - One of USA's Best College Buys                       TUX
> 3201 Campus Drive                             ~
> Klamath Falls, OR 97601                      'v'    standards
> Voice   1-541-885-1563                      // \\   corrupters:
> FAX     1-541-885-1689                     /(   )\   ^phear^
> email   gearond@oit.edu                     ^`~'^   the penguin
> ________________________________________________________________
> Happiness is when you want to go to your job in the morning and
> when you want to go home in the evening.
> ________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

RE: Entity Reference cleanup dumping core

Posted by Radovan Chytracek <Ra...@cern.ch>.
It works without access violation on NT.
I did not test it on Unix/Linux.
If this produces core dump on some Unix platform the problem is then
somewhere else.

Rado

> It still shouldn't core dump, right?
> 
> Radovan Chytracek wrote:
> > 
> > Hi,
> > 
> >           I have tested your program on Windows/NT 4.0 SP6, 
> MSVC++ 6.0 SP3,
> > Xerces-C 1.3.0/Win32Debug.
> > 
> > You had a few errors in the test1.xml itself + something in the 
> code. I attach
> > the C++ code, DTD and XML working for me.


Re: Entity Reference cleanup dumping core

Posted by Dennis Gearon <ge...@OIT.EDU>.
It still shouldn't core dump, right?

Radovan Chytracek wrote:
> 
> Hi,
> 
>           I have tested your program on Windows/NT 4.0 SP6, MSVC++ 6.0 SP3,
> Xerces-C 1.3.0/Win32Debug.
> 
> You had a few errors in the test1.xml itself + something in the code. I attach
> the C++ code, DTD and XML working for me.
> 
> --
> Radovan Chytracek                     LHCb experiment at CERN
> e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/~chytrace
> phone:  +41 22 76 72486
> 
>   ------------------------------------------------------------------------
>                   Name: grandpa.dtd
>    grandpa.dtd    Type: text/xml
>               Encoding: quoted-printable
> 
>                 Name: main1.cpp
>    main1.cpp    Type: C++ Source File (application/x-unknown-content-type-C++ Source File)
>             Encoding: quoted-printable
> 
>                  Name: test11.xml
>    test11.xml    Type: text/xml
>              Encoding: quoted-printable
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

-- 
________________________________________________________________
Dennis K. Gearon (Kegley)                           Loyal Member
Scientific Instrument Technician, School of ETM       of The 
Oregon Institute of Technology                       Order of
- One of USA's Best College Buys                       TUX
3201 Campus Drive                             ~
Klamath Falls, OR 97601                      'v'    standards
Voice   1-541-885-1563                      // \\   corrupters:
FAX     1-541-885-1689                     /(   )\   ^phear^
email   gearond@oit.edu                     ^`~'^   the penguin 
________________________________________________________________
Happiness is when you want to go to your job in the morning and 
when you want to go home in the evening.
________________________________________________________________

Re: Entity Reference cleanup dumping core

Posted by Tony Wuebben <wu...@lexis-nexis.com>.
Thanks, I'll take a look at it. This was a code snip from a much bigger
piece, I'll see where I went wrong in the snipping.

Thanks again

Radovan Chytracek wrote:
> 
> Hi,
> 
>           I have tested your program on Windows/NT 4.0 SP6, MSVC++ 6.0 SP3,
> Xerces-C 1.3.0/Win32Debug.
> 
> You had a few errors in the test1.xml itself + something in the code. I attach
> the C++ code, DTD and XML working for me.
> 
> --
> Radovan Chytracek                     LHCb experiment at CERN
> e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/~chytrace
> phone:  +41 22 76 72486
> 
>   ------------------------------------------------------------------------
>                   Name: grandpa.dtd
>    grandpa.dtd    Type: text/xml
>               Encoding: quoted-printable
> 
>                 Name: main1.cpp
>    main1.cpp    Type: unspecified type (application/octet-stream)
>             Encoding: quoted-printable
> 
>                  Name: test11.xml
>    test11.xml    Type: text/xml
>              Encoding: quoted-printable
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

RE: Entity Reference cleanup dumping core

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

          I have tested your program on Windows/NT 4.0 SP6, MSVC++ 6.0 SP3,
Xerces-C 1.3.0/Win32Debug.

You had a few errors in the test1.xml itself + something in the code. I attach
the C++ code, DTD and XML working for me.


--
Radovan Chytracek                     LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/~chytrace
phone:  +41 22 76 72486



Re: Entity Reference cleanup dumping core

Posted by Tony Wuebben <wu...@lexis-nexis.com>.
Here is a test main.C, DTD file, and 2 xml docs. Reading in test1.xml
dumps core at destruction of DOM. test3.xml works OK.

 


Andy Heninger wrote:
> 
> Oops, this looks like one that needs to be chased down.
> 
> If your sample program and data are small and self-contained,
> posting them would be a help, otherwise I'll put together
> a test here.
> 
> Andy Heninger
> IBM XML Technology Group, Cupertino, CA
> heninger@us.ibm.com
> 
> From: "Tony Wuebben" <wu...@lexis-nexis.com>
> >
> > I am using the stable release of Ver 1.3 of XERCES C++ and I have expand
> > Entity Reference set to on at parse time.  The problem I am seeing is
> > that when I remove an element from a tree (which removes it's entire
> > subbranch).  If this 'remove' removes the last occurance in the document
> > of any entity reference you will get a core dump upon cleanup. Any help
> > would be appreciated. I've include a description of what purify in
> > stating. If you need a sample progran and data please let me know.
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

Re: Entity Reference cleanup dumping core

Posted by Andy Heninger <an...@jtcsv.com>.
Oops, this looks like one that needs to be chased down.

If your sample program and data are small and self-contained,
posting them would be a help, otherwise I'll put together
a test here.

Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com



From: "Tony Wuebben" <wu...@lexis-nexis.com>
>
> I am using the stable release of Ver 1.3 of XERCES C++ and I have expand
> Entity Reference set to on at parse time.  The problem I am seeing is
> that when I remove an element from a tree (which removes it's entire
> subbranch).  If this 'remove' removes the last occurance in the document
> of any entity reference you will get a core dump upon cleanup. Any help
> would be appreciated. I've include a description of what purify in
> stating. If you need a sample progran and data please let me know.
>