Subject: | apparent defect in Node.pm |
$ perl -v
This is perl, v5.8.8 built for PA-RISC1.1-thread-multi
XML-XPath-1.13
HP-UX 11.31
My code is doing:
$self->{xpathObj}->createNode("/root/patch/categories/defect");
This results in:
PERL ERROR: splice() offset past end of array
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm line 398, <GEN11>
line 45.
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm line 398
XML::XPath::NodeImpl::insertAfter
('XML::XPath::Node::ElementImpl=ARRAY
(0x4242655c)', 'XML::XPath::Node::Element=REF
(0x4246670c)', 'XML::XPath::Node::Element=REF(0x424722e0)') called
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node/Element.pm line 45
Walking through the code w/the debugger:
XML::XPath::NodeImpl::insertAfter
(/opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm:398):
398: splice @{$self->[XML::XPath::Node::node_children]}, $pos +
1, 0, $newnode;
DB<14> p $newnode->toString
()
<categories />
DB<15> p
$pos
7
DB<16> p @{$self->
[XML::XPath::Node::node_children]}
XML::XPath::Node::Element=REF(0x417ab680)XML::XPath::Node::Comment=REF
(0x42449598)XML::XPath::Node::Element=REF(0x42459478)
XML::XPath::Node::Element=REF(0x4245ed04)XML::XPath::Node::Element=REF
(0x42466090)XML::XPath::Node::Element=REF(0x4246f340)
XML::XPath::Node::Element=REF(0x42475ac0)
DB<17> p "@{$self->
[XML::XPath::Node::node_children]}"
XML::XPath::Node::Element=REF(0x417ab680) XML::XPath::Node::Comment=REF
(0x42449598) XML::XPath::Node::Element=REF(0x42459478)
XML::XPath::Node::Element=REF(0x4245ed04) XML::XPath::Node::Element=REF
(0x42466090) XML::XPath::Node::Element=REF(0x4246f340)
XML::XPath::Node::Element=REF(0x42475ac0)
DB<18>
n
XML::XPath::NodeImpl::insertAfter
(/opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm:398):
398: splice @{$self->[XML::XPath::Node::node_children]}, $pos +
1, 0, $newnode;
DB<18>
PERL ERROR: splice() offset past end of array
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm line 398, <GEN11>
line 45.
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm line 398
XML::XPath::NodeImpl::insertAfter
('XML::XPath::Node::ElementImpl=ARRAY
(0x424262dc)', 'XML::XPath::Node::Element=REF
(0x424663cc)', 'XML::XPath::Node::Element=REF(0x42475ac0)') called
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node/Element.pm line 45
XML::XPath::Node::ElementImpl::appendChild
('XML::XPath::Node::ElementImpl=ARRAY
(0x424262dc)', 'XML::XPath::Node::Element=REF(0x424663cc)') called
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm line 240
XML::XPath::Node::__ANON__
[/opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm:242]
('XML::XPath::Node::Element=REF
(0x42402430)', 'XML::XPath::Node::Element=REF(0x424663cc)') called
at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath.pm line 264
XML::XPath::createNode('XML::XPath=HASH
(0x419e55dc)', '/root/patch/categories/defect') called
at /opt/scm/perlobj/parseInfoFile.pm line 705
parseInfoFile::_processCategory('parseInfoFile=HASH
(0x423286d8)', 'ARRAY(0x41a1be48)', 'undef') called
at /opt/scm/perlobj/parseInfoFile.pm line 219
parseInfoFile::_buildXpath('parseInfoFile=HASH
(0x423286d8)', '/remote/pptoolsmonk/demoprog/EARLY_rspear.pinfo')
called at /opt/scm/perlobj/parseInfoFile.pm line 94
parseInfoFile::load
('parseInfoFile', '/remote/pptoolsmonk/demoprog/EARLY_rspear.pinfo')
called at /opt/scm/perlobj/InfoData.pm line 72
InfoData::load
('InfoData', '/remote/pptoolsmonk/demoprog/EARLY_rspear.pinfo') called
at /opt/scm/bin/ppcut line 1050
main::openPinfo(0, 'Patch=HASH(0x4015161c)', 1) called
at /opt/scm/bin/ppcut line 3866
XML::XPath::NodeImpl::insertAfter
(/opt/perl_32/lib/site_perl/5.8.8/XML/XPath/Node.pm:402):
402: }