Home > Archive > PerlTk > April 2008 > Perl/Tk listbox failing on Ubuntu 7.10, How to fix?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Perl/Tk listbox failing on Ubuntu 7.10, How to fix?
|
|
| David Smith 2008-03-16, 7:18 pm |
| I am using Perl/Tk which comes with Kubuntu 7.10 and the listbox is crashing
the program (window disappears) with this message;
selection conversion left too many bytes unconverted
This happens when I make an extended selection in the listbox.
I googled the message and found that this error is known and there is a
"work around" in version 804.028. Unfortunately, I didn't find this
version available in the Ubuntu package repositories so I tried to
compile it by download from CPAN. Unfortunately "make test" fails,
apparently due (again) with an issue with listbox. Here's a few lines:
t/listbox....................NOK 455
# Failed test in t/listbox.t at line 1715.
# got: '0 0.05'
# expected: '0.5 0.75'
t/listbox....................NOK 456
# Failed test in t/listbox.t at line 1716.
# got: '0,0.05'
# expected: '0.5,0.75'
So I can't install the CPAN upgrade.
--------------------------
I have no idea how to address this issue but it makes Perl/Tk pretty
useless for my application. Any help would be appreciated.
Dave Smith
| |
| Lamprecht 2008-03-16, 7:18 pm |
| David Smith wrote:
> version 804.028. Unfortunately, I didn't find this
> version available in the Ubuntu package repositories so I tried to
> compile it by download from CPAN. Unfortunately "make test" fails,
> apparently due (again) with an issue with listbox. Here's a few lines:
>
> t/listbox....................NOK 455
> # Failed test in t/listbox.t at line 1715.
> # got: '0 0.05'
> # expected: '0.5 0.75'
> t/listbox....................NOK 456
> # Failed test in t/listbox.t at line 1716.
> # got: '0,0.05'
> # expected: '0.5,0.75'
>
> So I can't install the CPAN upgrade.
> --------------------------
> I have no idea how to address this issue but it makes Perl/Tk pretty
> useless for my application. Any help would be appreciated.
>
> Dave Smith
Hi,
just a guess: Did you try to reproduce this, running make test a second
time? It's a scan / dragto test and the other scan tests seem to have
passed (you only got these two errors?) ...
Christoph
| |
| David Smith 2008-03-16, 7:18 pm |
| Lamprecht wrote:
> David Smith wrote:
>
> Hi,
>
> just a guess: Did you try to reproduce this, running make test a second
> time? It's a scan / dragto test and the other scan tests seem to have
> passed (you only got these two errors?) ...
>
> Christoph
Hi Christoph,
Actually, it fails 21 tests related to listbox. I though I'd not
constipate the newsgroup with all of them. Ok, here goes.
Here are all of them:
---------------------------------------
t/listbox....................ok 191/539
# Failed test in t/listbox.t at line 1588.
# got: '1'
# expected: '3'
# Failed test in t/listbox.t at line 1589.
# got: '1'
# expected: '3'
t/listbox....................NOK 426
# Failed test in t/listbox.t at line 1620.
# got: '9'
# expected: '5'
t/listbox....................NOK 435
# Failed test in t/listbox.t at line 1629.
# got: '0.2 0.3'
# expected: '0.2 0.7'
t/listbox....................NOK 436
# Failed test in t/listbox.t at line 1630.
# got: 'y 0.2 0.3'
# expected: 'y 0.2 0.7'
t/listbox....................NOK 437
# Failed test in t/listbox.t at line 1639.
# got: '0.8 0.9'
# expected: '0.5 1'
# Failed test in t/listbox.t at line 1640.
# got: 'y 0.8 0.9'
# expected: 'y 0.5 1'
t/listbox....................NOK 439
# Failed test in t/listbox.t at line 1650.
# got: '0.3 0.4'
# expected: '0.3 0.8'
t/listbox....................NOK 440Use of uninitialized value in
subtraction (-) at t/listbox.t line 1692.
Use of uninitialized value in subtraction (-) at t/listbox.t line 1693.
# Failed test in t/listbox.t at line 1700.
# got: '0 0.2'
# expected: '0.2 0.4'
# Failed test in t/listbox.t at line 1701.
# got: '0 0.05'
# expected: '0.5 0.75'
# Failed test in t/listbox.t at line 1709.
# got: '0 0.05'
# expected: '0 0.25'
# Failed test in t/listbox.t at line 1713.
# got: '0 0.2'
# expected: '0.2 0.4'
# Failed test in t/listbox.t at line 1714.
# got: '0,0.2'
# expected: '0.2,0.4'
# Failed test in t/listbox.t at line 1715.
# got: '0 0.05'
# expected: '0.5 0.75'
# Failed test in t/listbox.t at line 1716.
# got: '0,0.05'
# expected: '0.5,0.75'
t/listbox....................NOK 451
# Failed test in t/listbox.t at line 1724.
# got: '0.95 1'
# expected: '0.75 1'
# Failed test in t/listbox.t at line 1727.
# got: '0.8 1'
# expected: '0.64 0.84'
# Failed test in t/listbox.t at line 1728.
# got: '0.95 1'
# expected: '0.25 0.5'
t/listbox....................NOK 462
# Failed test in t/listbox.t at line 1747.
# got: '5'
# expected: '6'
t/listbox....................NOK 466
# Failed test in t/listbox.t at line 1872.
# got: 'y 0 0.333333333333333'
# expected: 'y 0 1'
t/listbox....................NOK 486
# Failed test in t/listbox.t at line 1873.
t/listbox....................NOK 487# got: 'y 0 0.125'
# expected: 'y 0 0.625'
t/listbox....................ok 489/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%)
Dave
| |
| Lamprecht 2008-03-17, 8:11 am |
| David Smith wrote:
> Lamprecht wrote:
>
[color=darkred]
>
> Actually, it fails 21 tests related to listbox. I though I'd not
> constipate the newsgroup with all of them. Ok, here goes.
>
> Here are all of them:
Hi,
first of all, you should mail Slaven ;)
I'm running Tk-804.028 on Ubuntu 7.10 without problems. Your Test
failures might be related to some unusual font / screenresolution
setting. Also my /etc/X11/xorg.conf contains
Section "Files"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/truetype/freefont"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Don't know if that changes anything - but if you want to give it a try...
Christoph
| |
| David Smith 2008-03-17, 7:15 pm |
| Hi Christoph,
Thanks for looking at this. I experiemented a little with the
fonts but don't seem to affect things much. My xorg.conf file
looks pretty similar to yours except for the freefont entry. When
I added it to this section directly, X "didn't like it".
I did find another work around for my problem however --- I turned
off "klipper", the KDE clipboard manager, and the original problem
(instant death when you make a listbox selection) goes away. This
fixes my installation enough that I am going to forgo trying to
upgrade to 804.028 for now. (As an aside, killing klipper didn't
seem to affect "make test" for the 804.028 package).
I did email Slaven saying I had posted to c.l.p.t. Thanks again
for your help and advice.
Dave Smith
Lamprecht wrote:
> David Smith wrote:
>
>
> Hi,
>
> first of all, you should mail Slaven ;)
> I'm running Tk-804.028 on Ubuntu 7.10 without problems. Your Test
> failures might be related to some unusual font / screenresolution
> setting. Also my /etc/X11/xorg.conf contains
>
> Section "Files"
>
> FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
> FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
> FontPath "/usr/share/fonts/X11/Type1"
> FontPath "/usr/share/fonts/X11/100dpi"
> FontPath "/usr/share/fonts/X11/75dpi"
> FontPath "/usr/share/fonts/X11/misc"
> FontPath "/usr/share/fonts/truetype/freefont"
> FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
>
> EndSection
>
> Don't know if that changes anything - but if you want to give it a try...
>
> Christoph
| |
| smallpond 2008-03-17, 7:15 pm |
| On Mar 16, 9:35 am, David Smith <nob...@nowhere.no> wrote:
> I am using Perl/Tk which comes with Kubuntu 7.10 and the listbox is crashing
> the program (window disappears) with this message;
>
> selection conversion left too many bytes unconverted
>
> This happens when I make an extended selection in the listbox.
>
> I googled the message and found that this error is known and there is a
> "work around" in version 804.028. Unfortunately, I didn't find this
> version available in the Ubuntu package repositories so I tried to
> compile it by download from CPAN. Unfortunately "make test" fails,
> apparently due (again) with an issue with listbox. Here's a few lines:
>
> t/listbox....................NOK 455
> # Failed test in t/listbox.t at line 1715.
> # got: '0 0.05'
> # expected: '0.5 0.75'
> t/listbox....................NOK 456
> # Failed test in t/listbox.t at line 1716.
> # got: '0,0.05'
> # expected: '0.5,0.75'
>
> So I can't install the CPAN upgrade.
> --------------------------
> I have no idea how to address this issue but it makes Perl/Tk pretty
> useless for my application. Any help would be appreciated.
>
> Dave Smith
Dave,
Please try the following:
Edit the file: Tk-804.027_502/t/listbox.t
At line 150 change:
$lb->delete(qw/0 end/);
$lb->insert(qw/0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11/);
$lb->update;
To this: (adds the one line geometry call)
$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;
This got it to pass under KDE for me.
| |
| David Smith 2008-03-18, 4:21 am |
| Hey, this worked! At least the lisbox test doesn't fail anymore.
It was on line 1581 in Tk-804.028.
Say, could you explain how this works. I haven't a clue.
Going on the man page for Tk::Widget, you seem to be setting
the window geometry to an empty string?
Dave
----------------------------------------
smallpond wrote:
>
> Dave,
> Please try the following:
>
> Edit the file: Tk-804.027_502/t/listbox.t
>
> At line 150 change:
>
> $lb->delete(qw/0 end/);
> $lb->insert(qw/0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11/);
> $lb->update;
>
> To this: (adds the one line geometry call)
>
> $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;
>
> This got it to pass under KDE for me.
| |
| smallpond 2008-03-18, 4:21 am |
| On Mar 17, 11:24 pm, David Smith <nob...@nowhere.no> wrote:
> Hey, this worked! At least the lisbox test doesn't fail anymore.
> It was on line 1581 in Tk-804.028.
>
> Say, could you explain how this works. I haven't a clue.
> Going on the man page for Tk::Widget, you seem to be setting
> the window geometry to an empty string?
>
> Dave
Short answer: no.
I tracked the bug as far as I could. In this test, inserting
in the listbox sets the requested height correctly. update
should have redrawn the listbox but didn't. I couldn't
figure out why.
Listbox is kind of odd in that its size is supposed to
change as you add and delete elements. But read perldoc
Tk::Wm which says that if a height is explicitly set then
it stops tracking the requested size. Clearing the
geometry request resets it back to following the requested
size.
I don't know what that test is doing, so I don't know if I
fixed it or broke it. All I know is that it passes under
KDE now and still passes under Gnome.
--S
| |
| David Smith 2008-03-18, 8:08 am |
| Ok thanks, that's helpful. I was looking at the geometry() method for
Tk::Widget which says nothing about this behavior. I have run into
other odd interactions with the KDE window manager so this one doesn't
surprise me.
- Dave
smallpond wrote:
>
> I tracked the bug as far as I could. In this test, inserting
> in the listbox sets the requested height correctly. update
> should have redrawn the listbox but didn't. I couldn't
> figure out why.
>
> Listbox is kind of odd in that its size is supposed to
> change as you add and delete elements. But read perldoc
> Tk::Wm which says that if a height is explicitly set then
> it stops tracking the requested size. Clearing the
> geometry request resets it back to following the requested
> size.
>
> I don't know what that test is doing, so I don't know if I
> fixed it or broke it. All I know is that it passes under
> KDE now and still passes under Gnome.
> --S
| |
|
|
|
|
|