Subject: | coredump restarting Tk::MainLoop appears after 5.8.2 (testcase included) |
Tk 804.027 coredumps under 5.8.5 but not under 5.8.2. Here's the test
case and output:
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
use Test::More tests => 4;
diag("Perl version $] ... Tk version $Tk::VERSION");
diag("The main windows will each go away by themselves after 1sec");
diag("Creating the first main window");
my $mw = Tk::MainWindow->new();
ok($mw, "First Tk::MainWindow created");
diag("Setting an auto-destruct timer");
$mw->after(1000, sub { $mw->destroy() });
diag("Starting the first main loop");
Tk::MainLoop();
pass("Tk::MainLoop stopped the first time");
diag("Creating the second main window");
my $nw = Tk::MainWindow->new();
ok($nw, "Second Tk::MainWindow created");
diag("Setting an auto-destruct timer");
$nw->after(1000, sub { $nw->destroy() });
diag("Starting the second main loop");
Tk::MainLoop();
pass("Tk::MainLoop stopped a second time");
exit 0;
__END__
1) eyrie:~/perl/poe% /usr/local/perl-582-multi/bin/perl test-tk.perl
1..4
# Perl version 5.008002 ... Tk version 804.027
# The main windows will each go away by themselves after 1sec
# Creating the first main window
ok 1 - First Tk::MainWindow created
# Setting an auto-destruct timer
# Starting the first main loop
ok 2 - Tk::MainLoop stopped the first time
# Creating the second main window
ok 3 - Second Tk::MainWindow created
# Setting an auto-destruct timer
# Starting the second main loop
ok 4 - Tk::MainLoop stopped a second time
...
1) eyrie:~/perl/poe% perl test-tk.perl
1..4
# Perl version 5.008005 ... Tk version 804.027
# The main windows will each go away by themselves after 1sec
# Creating the first main window
ok 1 - First Tk::MainWindow created
# Setting an auto-destruct timer
# Starting the first main loop
ok 2 - Tk::MainLoop stopped the first time
# Creating the second main window
zsh: segmentation fault (core dumped) perl test-tk.perl
1) eyrie:~/perl/poe%