Re: [xml] xmlCopyNode error
- From: Daniel Veillard <veillard redhat com>
- To: martyn 2 russell bt com
- Cc: xml gnome org
- Subject: Re: [xml] xmlCopyNode error
- Date: Wed, 24 Apr 2002 13:46:17 -0400
On Wed, Apr 24, 2002 at 06:34:34PM +0100, martyn 2 russell bt com wrote:
I am trying to copy a node which has been parsed from a Jabber input stream.
However when I do, the name is "" and the contents of the node I am trying
to copy is out of bounds? Why is this? This only happens for the input "<iq
id='3' type='result'/>". I have managed to parse other bits and pieces fine
hoh Jabber, nice ;-)
and not had this problem, can anyone help?
The gdb output is show below:
26 <-- '<iq id='3' type='result'/>'
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 18377)]
0x402f30d0 in xmlStrdup () from /usr/lib/libxml2.so.2
(gdb) up
#1 0x4030828e in xmlStaticCopyNode () from /usr/lib/libxml2.so.2
(gdb) up
#2 0x40308517 in xmlCopyNode () from /usr/lib/libxml2.so.2
(gdb) up
#3 0x080550ae in JB_ParseInput (buf=0xbfffe570 "<iq id='3'
type='result'/>",
nBytes=26) at ../jb_parse.c:165
(gdb) p (*ctxt->myDoc->children)
$1 = {_private = 0x80a9360, type = 134912736, name = 0x80a9ae0 "",
how did you got a chidl without name ???
children = 0x80aac08, last = 0x0, parent = 0x80aab28, next = 0x80a9398,
prev = 0x0, doc = 0x0, ns = 0x11,
content = 0x65707974 <Address 0x65707974 out of bounds>,
properties = 0x404e3600, nsDef = 0x0}
Seems there is something really strange with the way your parser
context is set up. I think I know what you're trying to do but without
knowing what are the parameters passed to xmlCopyNode() it's nearly
impossible to find out where is the trouble.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]