tomazos has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to make test the module XML::LibXML but it is failing it's t/06nodetypes.t test.

It seg faults on the call $dom->createElement("A");

I have stepped through createElement in the debugger and this is what it says:

main::(t/06nodetypes.t:45): my $elem1 = $dom->createElement("A"); XML::LibXML::Document::createElement(/usr/lib/perl5/Carp.pm:97): 97: {local $@; require Carp::Heavy;} #XXX fix require to not clear $@? XML::LibXML::Document::createElement(/usr/lib/perl5/Carp.pm:97): 97: {local $@; require Carp::Heavy;} #XXX fix require to not clear $@? XML::LibXML::Document::createElement(/usr/lib/perl5/Carp.pm:97): 97: {local $@; require Carp::Heavy;} #XXX fix require to not clear $@? XML::LibXML::Document::createElement(/usr/lib/perl5/Carp/Heavy.pm:247) 247: 1; XML::LibXML::Document::createElement(/usr/lib/perl5/Carp.pm:98): 98: goto &longmess_heavy; Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:30): 30: return @_ if ref $_[0]; Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:31): 31: my $error = join '', @_; Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:32): 32: my $mess = ""; Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:33): 33: my $i = 1 + $CarpLevel; Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:34): 34: my ($pack,$file,$line,$sub,$hargs,$eval,$require); Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:35): 35: my (@a); Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:39): 39: while (do { { package DB; @a = caller($i++) } } ) { Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:39): 39: while (do { { package DB; @a = caller($i++) } } ) { Carp::longmess_heavy(/usr/lib/perl5/Carp/Heavy.pm:124): 124: $mess || $error; Signal SEGV:
Does anyone have any ideas?

Replies are listed 'Best First'.
Re: XML::LibXML Failed Test
by Matts (Deacon) on Apr 25, 2002 at 12:39 UTC
    Is this on perl 5.6.0? I don't think we're tested on 5.6.0, plus it's a pretty unstable perl.

    If it's not a 5.6.0 issue, then I don't know what to suggest. But it's a segfault, so a perl-level stack trace isn't going to do much good. Christian Glahn (the XML::LibXML maintainer) has a re-write in progress, that's almost ready for testing. You can get that from cvs via:

    cvs -d :pserver:anonymous@axkit.org:/home/cvs co -r mm_fix XML-LibXML

      Negative. This is 5.6.1.

      I downloaded the cvs version and get an even greater number of failed tests:

      t/07nodelist........ok 5/18Can't locate object method "appendWellBalan +cedChunk" via package "XML::LibXML::Element" (perhaps you forgot to l +oad "XML::LibXML::Element"?) at t/07nodelist.t line 52. t/08findnodes.......ok 1/14Can't locate object method "_findnodes" via + package "XML::LibXML::Element" (perhaps you forgot to load "XML::Lib +XML::Element"?) at blib/lib/XML/LibXML.pm line 375. t/13dtd.............ok 2/16Can't locate object method "new" via packag +e "XML::LibXML::Dtd" (perhaps you forgot to load "XML::LibXML::Dtd"?) + at t/13dtd.t line 19. t/14sax.............ok 7/46Can't locate object method "getData" via pa +ckage "XML::LibXML::Text" (perhaps you forgot to load "XML::LibXML::T +ext"?) at blib/lib/XML/LibXML/SAX/Parser.pm line 57. t/15nodelist........ok 2/11Can't locate object method "_findnodes" via + package "XML::LibXML::Document" (perhaps you forgot to load "XML::Li +bXML::Document"?) at blib/lib/XML/LibXML.pm line 375. t/16docnodes........ok 3/9Can't locate object method "getFirstChild" v +ia package "XML::LibXML::Document" (perhaps you forgot to load "XML:: +LibXML::Document"?) at t/16docnodes.t line 34. t/17callbacks.......ok 11/38Can't locate object method "_findnodes" vi +a package "XML::LibXML::Element" (perhaps you forgot to load "XML::Li +bXML::Element"?) at blib/lib/XML/LibXML.pm line 375. t/19encoding........ok 6/9Can't locate object method "appendText" via +package "XML::LibXML::Element" (perhaps you forgot to load "XML::LibX +ML::Element"?) at t/19encoding.t line 89.