Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Script crashes when parsing XML

by gellyfish (Monsignor)
on Sep 12, 2006 at 16:01 UTC ( [id://572566]=note: print w/replies, xml ) Need Help??


in reply to Script crashes when parsing XML

It appears to work fine without the join(). Running the program with Devel::Trace seems to indicate that it is segfaulting at:

>> /usr/lib/perl5/5.8.5/i586-linux-thread-multi/IO/Handle.pm:431: +read($_[0], $_[1], $_[2], $_[3] || 0);
although of course that could be messed up by the threading. I'd suggest paring this down to an even smaller example that exhibits the same behaviour (I would imagine that the actual content of the XML and what the callback does have no bearing on the behaviour,) and submit a report via perlbug and also possibly to the author of XML::Twig.

I do notice that you don't get the coredump if you change the safe_parsefile to:

my $fh; open $fh,'xmlfile.xml' or die $!; my $result = $statusTwig->safe_parse($fh); close $fh;
But then it blocks which is probably not what is wanted either.

/J\

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://572566]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found