swampyankee has asked for the wisdom of the Perl Monks concerning the following question:

When running some code by perl -d:ptkdb program.pl, I get this message:

error:bad screen distance "" at c:/Perl/site/lib/Tk/Submethods.pm lin +e 37. Tk::Error: bad screen distance "" at c:/Perl/site/lib/Tk/Submethods.pm + line 37. Tk callback for winfo Tk::Submethods::__ANON__[c:/Perl/site/lib/Tk/Submethods.pm:37] at c:/ +Perl/site/lib/Tk/Submethods.pm line 37 Tk::ProgressBar::_arrange at c:/Perl/site/lib/Tk/ProgressBar.pm line +99 Tk::After::once at c:/Perl/site/lib/Tk/After.pm line 89 [once,[{},after#858,idle,once,[_arrange,{}]]] ("after" script) Tk::Error: Can't set -variable to `SCALAR(0x3c55a48)' for Tk::Progress +Bar=HASH(0x41621e8): Bizarre copy of ARRAY in leave at c:/Perl /site/lib/Tk/Trace.pm line 89. at c:/Perl/site/lib/Tk/Derived.pm line 294 at c:/Perl/site/lib/Tk/Derived.pm line 306 Tk callback for .frame.button Tk::__ANON__[c:/Perl/site/lib/Tk.pm:252] at c:/Perl/site/lib/Tk.pm li +ne 252 Tk::Button::butUp at c:/Perl/site/lib/Tk/Button.pm line 113 <ButtonRelease-1> (command bound to event) error:Bizarre copy of ARRAY in leave at c:/Perl/site/lib/Tk/Trace.pm +line 89.

I do not get the same message when running the program directly, i.e., without using ptkdb. This only showed up when I added progress bars to the program.

Any monks with similar experiences?

I'm using ActiveState's Windows Port (5.8.8, binary build 817)


added in an update

When I get a chance -- probably not before the weekend -- I'll provide a program that replicates the error I'm getting.

The value for $Tk::VERSION: '804.027'
The version for ptkdb is 1.1091 (using File => about from the debugger).
The version for Tk::Progressbars is 4.010.

emc

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

Albert Einstein
  • Comment on Errors reported when running program using Tk:ProgressBar through ptkdb
  • Download Code

Replies are listed 'Best First'.
Re: Errors reported when running program using Tk:ProgressBar through ptkdb
by shmem (Chancellor) on Aug 23, 2006 at 05:41 UTC
    Apart from some code, please provide your Tk's version number - Bizarre copy of ARRAY in leave looks like promising some fun :-)

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Errors reported when running program using Tk:ProgressBar through ptkdb
by GrandFather (Saint) on Aug 23, 2006 at 03:36 UTC

    Can you provide a minimal sample that demonstrates teh problem?


    DWIM is Perl's answer to Gödel
Re: Errors reported when running program using Tk:ProgressBar through ptkdb
by jdtoronto (Prior) on Aug 23, 2006 at 12:57 UTC
    swampyankee,

    I use progress bars in a couple of applications, but I have never had cause to try and use the debugger. Do you have a piece of test code we can run?

    jdtoronto

Re: Errors reported when running program using Tk:ProgressBar through ptkdb
by swampyankee (Parson) on Aug 29, 2006 at 18:19 UTC

    Apologies to all; I've not had time to trim the code down to the minimum showing the problem. It's on my "todo" list. Unfortunately, my todo list is processed only by push and unshift commands.

    emc

    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Albert Einstein