Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Hard to Debug windows memory error

by ysth (Canon)
on Dec 31, 2015 at 19:25 UTC ( [id://1151615]=note: print w/replies, xml ) Need Help??


in reply to Hard to Debug windows memory error

Do you know whether your script is actually finishing? Or even fully getting started? Try cutting out bits of the script to see whether that has any effect and to see if you can come up with a minimal complete example that still fails that you can show us.

--
A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |

Replies are listed 'Best First'.
Re^2: Hard to Debug windows memory error
by jandrew (Chaplain) on Dec 31, 2015 at 19:48 UTC

    The very last line of my script is a print statement that does print under several tested environments.

    I suspect the problem is in the perl garbage collection. The difficulty is the module I'm writing using the script is is complex and multi-layered. I was hoping to get some debugging advice/techniques that I could use so that I could narrow it down to a simple script that reliably fails.

      Try putting some print statements in END blocks: BEGIN, UNITCHECK, CHECK, INIT and END in perlmod

      That might help you debug the unwind. You can also create some objects with controlled scope and put diagnostics in their Destructors.


      #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

        kennethk thank you for your suggestion. I did already try BEGIN blocks but I had forgotten to try END blocks. When retesting a simple print statement in an END block didn't even execute. I interpret that to mean that windows killed the general perl interpreter prior to reaching the END block. I hope I read that right.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found