Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 31290
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: goz_02451 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: listbox.t fails in make test on fedora with KDE desktop
Only the listbox test fails. Tried under Fedora 5 and 6. Relevant output of build on FC 5 with perl 5.8.8: # Tk platform: unix # window manager: KWin # version: <unknown> # XFT: no t/listbox....................NOK 425/539 # Failed test at t/listbox.t line 1587. # got: '1' # expected: '3' t/listbox....................NOK 426/539 # Failed test at t/listbox.t line 1588. # got: '1' # expected: '3' t/listbox....................NOK 435/539 # Failed test at t/listbox.t line 1619. # got: '9' # expected: '5' t/listbox....................NOK 436/539 # Failed test at t/listbox.t line 1628. # got: '0.2 0.3' # expected: '0.2 0.7' t/listbox....................NOK 437/539 # Failed test at t/listbox.t line 1629. # got: 'y 0.2 0.3' # expected: 'y 0.2 0.7' t/listbox....................NOK 438/539 # Failed test at t/listbox.t line 1638. # got: '0.8 0.9' # expected: '0.5 1' t/listbox....................NOK 439/539 # Failed test at t/listbox.t line 1639. # got: 'y 0.8 0.9' # expected: 'y 0.5 1' t/listbox....................NOK 440/539 # Failed test at t/listbox.t line 1649. # got: '0.3 0.4' # expected: '0.3 0.8' Use of uninitialized value in subtraction (-) at t/listbox.t line 1691. Use of uninitialized value in subtraction (-) at t/listbox.t line 1692. t/listbox....................NOK 451/539 # Failed test at t/listbox.t line 1699. # got: '0 0.2' # expected: '0.2 0.4' t/listbox....................NOK 452/539 # Failed test at t/listbox.t line 1700. # got: '0 0.05' # expected: '0.5 0.75' t/listbox....................NOK 454/539 # Failed test at t/listbox.t line 1708. # got: '0 0.05' # expected: '0 0.25' t/listbox....................NOK 455/539 # Failed test at t/listbox.t line 1712. # got: '0 0.2' # expected: '0.2 0.4' t/listbox....................NOK 456/539 # Failed test at t/listbox.t line 1713. # got: '0,0.2' # expected: '0.2,0.4' t/listbox....................NOK 457/539 # Failed test at t/listbox.t line 1714. # got: '0 0.05' # expected: '0.5 0.75' t/listbox....................NOK 458/539 # Failed test at t/listbox.t line 1715. # got: '0,0.05' # expected: '0.5,0.75' t/listbox....................NOK 460/539 # Failed test at t/listbox.t line 1723. # got: '0.95 1' # expected: '0.75 1' t/listbox....................NOK 461/539 # Failed test at t/listbox.t line 1726. # got: '0.8 1' # expected: '0.64 0.84' t/listbox....................NOK 462/539 # Failed test at t/listbox.t line 1727. # got: '0.95 1' # expected: '0.25 0.5' t/listbox....................NOK 466/539 # Failed test at t/listbox.t line 1746. # got: '5' # expected: '6' t/listbox....................NOK 486/539 # Failed test at t/listbox.t line 1871. # got: 'y 0 0.333333333333333' # expected: 'y 0 1' t/listbox....................NOK 487/539 # Failed test at t/listbox.t line 1872. # got: 'y 0 0.125' # expected: 'y 0 0.625' t/listbox....................ok 495/539# Looks like you failed 21 tests of 539. t/listbox....................dubious Test returned status 21 (wstat 5376, 0x1500) DIED. FAILED tests 425-426, 435-440, 451-452, 454-458, 460-462, 466, 486-487 Failed 21/539 tests, 96.10% okay (less 26 skipped tests: 492 okay, 91.28%) Adding a sleep to the test just after line 1588 shows that no characters are displayed in the listbox. When I coded up an emulation of that test it displays correctly, but printed 2 instead of 3 for both lines. The test code is attached.
Subject: lbtest.pl
#!/usr/bin/perl -w use Tk; use Tk::Listbox; my $mw = MainWindow->new( -title => "Listbox Test"); $mw->optionAdd("*Listbox.font", 'Helvetica -12 bold'); # 2 2 # $mw->optionAdd("*Listbox.font", '{Adobe Helvetica} -12 bold'); # 2 2 # my $fixed = "-adobe-courier-medium-r-normal--12-120-75-75-m-*-iso8859-1"; $mw->optionAdd("*Listbox.font", $fixed); # 2 3 on fc5 but 3 3 on fc6 $mw->optionAdd("*Listbox.borderWidth",2); $mw->optionAdd("*Listbox.highlightThickness",2); my $lb = $mw->Listbox->pack; $lb->delete(qw/0 end/); $lb->insert(qw/0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11/); $lb->update; print "Tk version $Tk::VERSION\n"; print "Listbox version $Tk::Listbox::VERSION\n"; print "Line 1587 result is: ",$lb->index(q/@5,57/)," expect 3\n"; print "Line 1587 result is: ",$lb->index(q/@5,58/)," expect 3\n"; # loop so we can see what this should look like MainLoop;
From: goz_02451 [...] yahoo.com
Build on same system with same installed fonts and same xfs fontserver passes all tests under gnome desktop. # Tk platform: unix # window manager: Metacity # version: 2.14.3 # XFT: no t/listbox....................ok 26/539 skipped: various reasons, 4/539 unexpectedly succeeded TODO PASSED tests 320-322, 328 lbtest.pl output using 'Helvetica -12 bold' (not $fixed) is now: Tk version 804.027502 Listbox version 4.014 Line 1587 result is: 3 expect 3 Line 1587 result is: 3 expect 3 ^^ typo, should be 1588
From: SREZIC [...] cpan.org
On Fri Dec 07 13:32:28 2007, goz_02451@yahoo.com wrote: Show quoted text
> Only the listbox test fails. Tried under Fedora 5 and 6. Relevant > output of build on FC 5 with perl 5.8.8: >
[...] Show quoted text
> > Adding a sleep to the test just after line 1588 shows that no characters > are displayed in the listbox.
Instead of a sleep, can you add $mw->waitVariable(\my $foo); instead at this point and then try some window manager related options like resizing, iconifying & restoring, maximizing etc. to make the listbox contents visible? Regards, Slaven
From: goz_02451 [...] yahoo.com
On Fri Dec 07 14:58:44 2007, SREZIC wrote: Show quoted text
> On Fri Dec 07 13:32:28 2007, goz_02451@yahoo.com wrote:
> > Only the listbox test fails. Tried under Fedora 5 and 6. Relevant > > output of build on FC 5 with perl 5.8.8: > >
> [...]
> > > > Adding a sleep to the test just after line 1588 shows that no characters > > are displayed in the listbox.
> > Instead of a sleep, can you add > > $mw->waitVariable(\my $foo); > > instead at this point and then try some window manager related options > like resizing, iconifying & restoring, maximizing etc. to make the > listbox contents visible? > > Regards, > Slaven
Good idea. When it stopped, I found that there were two windows. The one in front has the title "Toplevel" and is an empty frame with plain gray background. Behind it is a second window with title "Listbox" and it has the expected contents: el0 ... el9, although it is sized so that only the first two lines are showing. Resizing it shows the rest of the lines. The font looks OK to me. If I close Listbox then both windows get closed, but I can close Toplevel and Listbox will still be there. So that means Toplevel is a child of Listbox?
From: goz_02451 [...] yahoo.com
On Mon Dec 10 15:56:51 2007, goz_02451@yahoo.com wrote: Show quoted text
> On Fri Dec 07 14:58:44 2007, SREZIC wrote:
> > On Fri Dec 07 13:32:28 2007, goz_02451@yahoo.com wrote:
> > > Only the listbox test fails. Tried under Fedora 5 and 6. Relevant > > > output of build on FC 5 with perl 5.8.8: > > >
> > [...]
> > > > > > Adding a sleep to the test just after line 1588 shows that no
characters Show quoted text
> > > are displayed in the listbox.
> > > > Instead of a sleep, can you add > > > > $mw->waitVariable(\my $foo); > > > > instead at this point and then try some window manager related options > > like resizing, iconifying & restoring, maximizing etc. to make the > > listbox contents visible? > > > > Regards, > > Slaven
> > > Good idea. When it stopped, I found that there were two > windows. The one in front has the title "Toplevel" and > is an empty frame with plain gray background. Behind it > is a second window with title "Listbox" and it has the > expected contents: el0 ... el9, although it is > sized so that only the first two lines are showing. > Resizing it shows the rest of the lines. The > font looks OK to me. > > If I close Listbox then both windows get closed, but I can > close Toplevel and Listbox will still be there. So > that means Toplevel is a child of Listbox?
When I try the same test with gnome, it has the same two windows, but the Listbox window shows all 10 lines. I don't see any other obvious difference - except that the test passes.
From: goz_02451 [...] yahoo.com
That seems to be the problem. When I create the Listbox with my $lb = $mw->Listbox(-height=>2)->pack; My lbtest.pl script reports: Line 1587 result is: 1 expect 3 Line 1587 result is: 1 expect 3 So I'm trying to figure out why the Listbox is only two lines in KDE but 10 lines in gnome.
From: goz_02451 [...] yahoo.com
Just to check, I added a pause before line 1587 to allow me to resize the window. SKIP: { skip($skip_font_test, 2) if $skip_font_test; my $line = <STDIN>; $lb->update; is($lb->index(q/@5,57/), 3); is($lb->index(q/@5,58/), 3); $mw->waitVariable(\my $foo); } If I resize the window manually to a larger size, then it passes these two tests.
Subject: Re: [rt.cpan.org #31290] listbox.t fails in make test on fedora with KDE desktop
Date: 11 Dec 2007 22:50:02 +0100
To: bug-Tk [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
"Mr J Mather via RT" <bug-Tk@rt.cpan.org> writes: Show quoted text
> Queue: Tk > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=31290 > > > Just to check, I added a pause before line 1587 to allow me to resize > the window. > > SKIP: { > skip($skip_font_test, 2) if $skip_font_test; > my $line = <STDIN>; $lb->update; > is($lb->index(q/@5,57/), 3); > is($lb->index(q/@5,58/), 3); > $mw->waitVariable(\my $foo); > } > > If I resize the window manually to a larger size, then it passes these > two tests. >
I assume this is related to the many TODO tests in wm-tcl.t, where toplevels are not resized as expected on some window managers (notably kwin). Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tktimex - time recording tool http://sourceforge.net/projects/ptktools/
From: goz_02451 [...] yahoo.com
On Tue Dec 11 16:58:07 2007, slaven@rezic.de wrote: Show quoted text
> "Mr J Mather via RT" <bug-Tk@rt.cpan.org> writes: >
> > Queue: Tk > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=31290 > > > > > Just to check, I added a pause before line 1587 to allow me to resize > > the window. > > > > SKIP: { > > skip($skip_font_test, 2) if $skip_font_test; > > my $line = <STDIN>; $lb->update; > > is($lb->index(q/@5,57/), 3); > > is($lb->index(q/@5,58/), 3); > > $mw->waitVariable(\my $foo); > > } > > > > If I resize the window manually to a larger size, then it passes these > > two tests. > >
> > I assume this is related to the many TODO tests in wm-tcl.t, where > toplevels are not resized as expected on some window managers (notably > kwin). > > Regards, > Slaven >
I think KDE must be somehow causing the window to be marked as manually resized or moved, because clearing the geometry fixes this problem. I can't see any reason why the geometry should be set at this point in the test, so clearing it should be a no-op. Tested in KDE and Gnome. diff -c listbox.t.orig listbox.t *** listbox.t.orig 2008-03-17 10:05:57.000000000 -0400 --- listbox.t 2008-03-17 15:51:11.000000000 -0400 *************** *** 1579,1584 **** --- 1579,1585 ---- $lb->delete(qw/0 end/); $lb->insert(qw/0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11/); + $mw->geometry(""); $lb->update; SKIP: {
On Tue Mar 18 11:49:24 2008, goz_02451@yahoo.com wrote: Show quoted text
> On Tue Dec 11 16:58:07 2007, slaven@rezic.de wrote:
> > "Mr J Mather via RT" <bug-Tk@rt.cpan.org> writes: > >
> > > Queue: Tk > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=31290 > > > > > > > Just to check, I added a pause before line 1587 to allow me to resize > > > the window. > > > > > > SKIP: { > > > skip($skip_font_test, 2) if $skip_font_test; > > > my $line = <STDIN>; $lb->update; > > > is($lb->index(q/@5,57/), 3); > > > is($lb->index(q/@5,58/), 3); > > > $mw->waitVariable(\my $foo); > > > } > > > > > > If I resize the window manually to a larger size, then it passes these > > > two tests. > > >
> > > > I assume this is related to the many TODO tests in wm-tcl.t, where > > toplevels are not resized as expected on some window managers (notably > > kwin). > > > > Regards, > > Slaven > >
> > > I think KDE must be somehow causing the window to be marked > as manually resized or moved, because clearing the geometry > fixes this problem. I can't see any reason why the geometry > should be set at this point in the test, so clearing it should > be a no-op. Tested in KDE and Gnome. > > diff -c listbox.t.orig listbox.t > *** listbox.t.orig 2008-03-17 10:05:57.000000000 -0400 > --- listbox.t 2008-03-17 15:51:11.000000000 -0400 > *************** > *** 1579,1584 **** > --- 1579,1585 ---- > > $lb->delete(qw/0 end/); > $lb->insert(qw/0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11/); > + $mw->geometry(""); > $lb->update; > > SKIP: {
This hack is now in the Tk SVN repository https://svn.perl.org/modules/Tk/trunk . Thanks, Slaven