in reply to Crashing perl -c in version 5.20?

Your "Working command" demonstrates a fairly serious problem that could be, for example, memory corruption:

Free non-Callback 1011f4aa0 RV=0 during global destruction.

So I'm not terribly shocked to have such a problem manifest somewhat differently under a different set of versions of components.

Which points the finger at your problem being in Tk and/or POE, not Perl. It could be a bug in Tk that gets exposed by something POE does. Or vice versa.

It could even be not a bug in Tk or POE, but just that Tk makes some too-bold assumptions that just conflict with some too-bold assumptions that POE makes. Put another way, it could just be that Tk and POE are incompatible. They might be only somewhat incompatible such that they can work together in a lot of cases but not all.

It is my experience that Perl modules that use much XS code are much more likely to have these kinds of problems than non-XS modules or Perl. So I'd bet money that Tk is the most to blame.

I've usually been able to get around such problems at least for a while, by switching to a different version of the XS-using module. Even better is to switch to a module that does not use as much XS code. That would mean using a graphics system other than Tk, of course. And XS code is probably common in most if not all GUI modules. But the bugs and/or sensitivities are likely to be different enough to give you a good chance of not running into problems, at least for a while.

- tye        

Replies are listed 'Best First'.
Re^2: Crashing perl -c in version 5.20? (magic)
by cmv (Chaplain) on Jan 06, 2016 at 16:14 UTC
    Hi tye++

    Many thanks for the thoughtful response. What you say makes sense, and I will follow-up with Rocco Caputo (POE) and Slaven Rezic (Tk) to see if we can figure out this issue.

    BTW: I was able to eliminate the "Free non-Callback" problem by changing the use POE command to be use POE qw (Loop::TkActiveState);

    Here is the latest version & output...

    mactst.pl:

    use warnings; use strict; use Tk; use POE qw (Loop::TkActiveState); if(! defined($poe_main_window)) { warn "\$poe_main_window not defined"; }
    Working command:
    $ /usr/local/ActivePerl-5.14/bin/perl -c mactst.pl mactst.pl syntax OK
    Non-working command:
    $ /usr/local/ActivePerl-5.20/bin/perl -c mactst.pl mactst.pl syntax OK . (1): 0 0x1030c4968 IV f=00000001 undef(1) SV = IV(0x1030c4958) at 0x1030c4968 REFCNT = 1 FLAGS = () IV = 0 Abort