Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Hard to Debug windows memory error

by kennethk (Abbot)
on Dec 31, 2015 at 20:24 UTC ( [id://1151621]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Hard to Debug windows memory error
in thread Hard to Debug windows memory error

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.

  • Comment on Re^3: Hard to Debug windows memory error

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

    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.

      I'd modify your statement to say Windows killed the general perl interpreter prior to reaching that END block. The previously provided link shows order of execution of END blocks. See what happens when you put your END block right before the end of your master script. You may still be able to track down the problem via bisection. An object at the package level of your problematic module may also yield useful information via its DESTROY.

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

        kennethk I find that I am not doing a very good job of being precise. The END block that failed to execute in my previous statement was the last line of the master script. I did also attempt a manual DEMOLISH (Moose) block at the end of all classes where all but the master class DEMOLISH executed correctly. The master class DEMOLISH failed repeatably for a very specific attribute clearance with some variations done in testing to validate that was the unclearable attribute. In order to understand if I had somehow triggered the DEMOLISH calls out of sequence I also deleted all class DEMOLISH blocks in order to see if perl's automatic garbage collection would fix the problem as well. Neither solution worked.

Log In?
Username:
Password:

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

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

    No recent polls found