On Fri Mar 16 20:46:03 2007, kernel@pkts.ca wrote:
Show quoted text> Hi..
>
> Be sure to include at least the following information:
>
> * Distribution name and version perl-Tk-804.027-10.fc6
> * Perl version v5.8.8
> * Operating System vendor and version: Fedora Core 6: uname -a:
> 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 19:28:18 EST 2007 i686 i686
> i386 GNU/Linux
>
> Other things that are often helpful:
>
> * Details about your operating environment that might be related
> to the issue being described: Standard Gnome environment
> * Exact cut and pasted error or warning messages: Segmentation
> fault
> * The shortest, clearest code you can manage to write which
> reproduces the bug described. (See below)
> * A patch against the latest released version of this distribution
> which fixes this bug. (Er, sorry)
>
>
> This minimal program segfaults when you click 'exit'.
>
> #!/usr/bin/perl -w
> use strict;
> use Tk;
>
> my $mw = new MainWindow;
> my $entry=$mw->Entry(-text => '', -width => 140)->pack;
> my $text=$mw->Text()->pack;
> my $button=$mw->Button(-text => 'Exit',-command => \&exit)->pack;
> MainLoop;
>
I cannot reproduce the segfault with FreeBSD 6.2 + Tk 804.027_050 and Tk
804.027 and with Debian + Tk 804.027, all with perl 5.8.8.
Can you try the development version of Tk (available at
http://search.cpan.org/~srezic/Tk-804.027_500/ ) and see if it fixes the
problem?
As a workaround, does it work if you use
sub { $mw->destroy }
instead of the exit?
Regards,
Slaven