• Perl/TK Tk_Freecursor-Error

    From pit@21:1/5 to All on Thu Aug 20 05:04:58 2015
    Hi All,

    I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032

    In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:

    "Tk_FreeCursor received unknown cursor argument"

    and the program doesn't finish correctly.

    Can someone help me ?

    Pit

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From $Bill@21:1/5 to pit on Thu Aug 20 14:02:30 2015
    On 8/20/2015 05:04, pit wrote:
    Hi All,

    I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032

    In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:

    "Tk_FreeCursor received unknown cursor argument"

    and the program doesn't finish correctly.

    Can someone help me ?

    Remove as much code as you can where it still reproduces the error. This
    will either give you an idea of where the fault is or you can post the
    small remaining snippet for others to peruse/try.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pit@21:1/5 to All on Mon Aug 24 03:16:51 2015
    Am Donnerstag, 20. August 2015 23:02:42 UTC+2 schrieb $Bill:
    On 8/20/2015 05:04, pit wrote:
    Hi All,

    I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032

    In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:

    "Tk_FreeCursor received unknown cursor argument"

    and the program doesn't finish correctly.

    Can someone help me ?

    Remove as much code as you can where it still reproduces the error. This will either give you an idea of where the fault is or you can post the
    small remaining snippet for others to peruse/try.

    here is my the code snippet:

    use strict;
    use Tk;
    use Tk::HList;

    my $mw = MainWindow->new(-title => 'Mainwindow',
    -cursor => 'arrow');
    $mw->protocol("WM_DELETE_WINDOW", \&del_win);

    my $cursor = $mw->cget(-cursor);

    my $hl = $mw->Scrolled('HList',
    -columns => 1,
    )->pack(-expand => 1,
    -fill => 'both',
    -side => "top",
    -anchor => "nw");

    my $i;
    for ($i = 0; $i <= 20; $i++)
    {
    $hl->add($i);
    $hl->itemCreate($i, 0, -text => $i);
    }

    $hl->update();

    MainLoop;

    sub del_win
    {
    $mw->destroy();
    Tk::exit(1);
    }

    Start the program, scroll down some lines and finish the program, then the error will be occured. When scrolling down and scroll up again to the first line, it doesn't happen.

    pit

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From $Bill@21:1/5 to pit on Mon Aug 24 11:28:00 2015
    On 8/24/2015 03:16, pit wrote:
    Am Donnerstag, 20. August 2015 23:02:42 UTC+2 schrieb $Bill:
    On 8/20/2015 05:04, pit wrote:
    Hi All,

    I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032

    In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:

    "Tk_FreeCursor received unknown cursor argument"

    and the program doesn't finish correctly.
    ...
    Start the program, scroll down some lines and finish the program, then the error will be occured. When scrolling down and scroll up again to the first line, it doesn't happen.

    I can't reproduce it, so that leads me to believe it's a version/platform issue.
    I'm on Doze 8.1 with AS Perl 5.20 and Tk 804.033

    See if this one does the same (removed the delete window parts).

    use strict;
    use warnings;
    use Tk;
    use Tk::HList;

    my $mw = MainWindow->new(-title => 'Mainwindow', -cursor => 'arrow');
    my $cursor = $mw->cget(-cursor);
    my $hl = $mw->Scrolled('HList', -columns => 1,)->pack(
    -expand => 1, -fill => 'both', -side => "top", -anchor => "nw"); $mw->Button(-text => 'Quit', -command => sub { exit; })->pack(
    -side => 'bottom');
    for (my $i = 0; $i <= 20; $i++) {
    $hl->add($i);
    $hl->itemCreate($i, 0, -text => $i);
    }
    $hl->update();

    MainLoop;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Bell_West@21:1/5 to pit on Mon Aug 24 18:32:21 2015
    On 2015-08-24, pit wrote:
    Start the program, scroll down some lines and finish the program, then the error will be occured. When scrolling down and scroll up again to the first line, it doesn't happen.

    Unable to reproduce on Perl 5.14.2, Perl/Tk 1:804.030-1. Program exits normally.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Bell_West@21:1/5 to All on Mon Aug 24 18:33:38 2015
    On 2015-08-24, $Bill wrote:
    See if this one does the same (removed the delete window parts).

    No error for me, Linux perl 5.14.2 and Perl/Tk 1:804.030-1.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nekotobi@gmail.com@21:1/5 to pit on Sat Feb 16 20:50:41 2019
    On Thursday, August 20, 2015 at 5:04:59 AM UTC-7, pit wrote:
    Hi All,

    I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032

    In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:

    "Tk_FreeCursor received unknown cursor argument"

    and the program doesn't finish correctly.

    Can someone help me ?

    Pit

    3 years later I found this issue to still be occurring on 64-bit builds of Perl. It seems that a type Tk_Cursor was added to replace Cursor and not all files were updated with the new type. On 32-bit builds there is no difference between the two but on
    64-bit builds Tk_Cursor is a 64-bit value and Cursor is a 32-bit value which leads to errors when dereferencing Tk_Cursor pointers that are actually backed by 32-bit Cursor data types.

    I created a PR that resolves the issue but Perl::Tk doesn't seem to be maintained anymore. https://github.com/eserte/perl-tk/pull/40

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)