Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: perl dying without a trace

by GrandFather (Saint)
on Oct 24, 2006 at 22:47 UTC ( [id://580421]=note: print w/replies, xml ) Need Help??


in reply to perl dying without a trace

How do you know that that is the line it is dying on?

If you pull the pack out onto a seperate line does the problem persist? Assuming it does, can you replace the packed value with a constant and does the problem persist? If you change the constant does the problem persist? If you replace the pack parameters with constants does the problem persist?


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: perl dying without a trace
by Crackers2 (Parson) on Oct 24, 2006 at 23:08 UTC

    I've added print statements before and after the point where I knew it was dying (by looking at the output), and basically kept adding more closer together until I got to this line. The print before shows up, the print after doesn't.

    It did just occur to me that I may not have explicitely disabled buffering on STDOUT, so I'll run it again that way to make sure I'm not just missing some messages that were still in the buffer.

    If I replace the packed values with constants then the program won't run. This line gets called successfully hundreds of times already before the program dies, and always with different values in the packet. I can try modifying enough of the callers to pretend I got a successful reply, but that's basically gonna take away all of the socket interaction.

      I wouldn't be absolutly sure that that was where the problem was even with buffering turned off, however it is worth a try.

      More important is to try and print out the parameters to the pack and see if those are important to the issue. If it fails with specific issues you can then use a debugger and have it break when the appropriate line is reached with the danger parameters.


      DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-23 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found