On 2018-11-18 04:17:45, duncs wrote:
Show quoted text> $ ./tk_bug
> bad pad value "3m": must be positive screen distance at
> /usr/lib64/perl5/vendor_perl/Tk/Widget.pm line 1218.
> at /usr/lib64/perl5/vendor_perl/Tk/Widget.pm line 203.
>
> This issue is not seen when converting to using Tk::DialogBox
>
> This bug is seen on Fedora Core 29 using Tk version 804.034
> This bug is not seen on Debian Jessie using Tk 804.033
>
> Minimal example code attached.
I cannot reproduce it. What I tried is:
- running your script on a Debian/jessie system with different perl + Tk versions
- running your script on a Fedora 28 VM with the system perl and a self-compiled perl, both using Tk 804.034
- use the Dockerfile below. Save these lines as "Dockerfile", add the test script into the same directory, add also something like
$window->after(10*1000, sub { $window->destroy });
before the MainLoop so the test script terminates after 10s, and run:
docker build -t perl-test -f Dockerfile . && docker run perl-test
FROM fedora:29
RUN yum -y install perl-Tk
RUN yum -y install xorg-x11-server-Xvfb
ADD tk_bug /tmp/tk_bug
RUN Xvfb :123 & sleep 10; echo "Start test script"; DISPLAY=:123 perl /tmp/tk_bug
So maybe something else is different in your system. Maybe an issue with present or nonexisting fonts? Unlikely. Maybe stray X resource definitions? Possible, so I was not able to reproduce a problem using something like
perl tk_add -xrm "*pad: 3m"
An idea would be to check the output of "xrdb -query" for suspicious definitions.
Regards,
Slaven