Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: weird case of memory corruption?

by Discipulus (Abbot)
on May 12, 2021 at 09:08 UTC ( #11132454=note: print w/replies, xml ) Need Help??


in reply to Re^2: weird case of memory corruption?
in thread weird case of memory corruption?

Hello again,

you are rigth about -textvariable pointing to a nested val: it works correctly (see also why won't Tk textvariable take a reference to an array element? Tk::Entry not updating when textvariable changes. and perl/Tk Entry widget displays wrong value when -textvariable is shared).

My dumping using Data::Dump dd method shows, if you uncomment and so use your original code PBar( $tmpbar, \$pid{ex1}->{val}, -30, 70 )->pack(); that sometimes val is undef:

>perl tkprogressbar.pl val PBar1: -21.5 val PBar2: -30 ("ex1", { as => "temp", val => -30 }) val Labels: -30 ("ex1", { as => "temp", val => -30 }) >perl tkprogressbar.pl val PBar1: -21.5 Use of uninitialized value in concatenation (.) or string at tkprogres +sbar.pl line 39. val PBar2: ("ex1", { as => "temp", val => undef }) Use of uninitialized value in concatenation (.) or string at tkprogres +sbar.pl line 21. val Labels: ("ex1", { as => "temp", val => undef })

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2021-09-19 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?