Gtk2 apps killing my Perl/Tk apps



Hi,
This is a really strange problem, and if anyone would
know the answer, muppet would. :-)

I have the latest gtk+-2.8.6, and the c-libs demo will
cause the same problem, but since this is a gtk-perl
list, the demo from Gtk2-1.110/gtk-demo does it too.

To cause the problem, start a simple perl/Tk app, say
#######################################################
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
use Tk::Table;

my $mw= tkinit;
$mw->geometry("400x400+100+100");

my $table = $mw->Scrolled('Table',
                       -rows => 20,
                       -columns => 50,
                       -scrollbars => 'osoe',
                       -takefocus => 1,
                      # -fixedrows => 9, 
                       )->pack;

 foreach my $row (0 .. 8) {
      foreach my $col (0 .. 8) {
       my $cell = $table->Entry (
             -width => 4,
             -text => "$col, $row");
       $table->put ($row, $col, $cell);
 }
}

MainLoop;
__END__
##########################################################

Then start the gtk-demo and when you double-click on an item in the
left list( to start it's demo),  the Perl/Tk app will seg-fault.  If I restart
the Tk app, the problem will not re-occur, it only happens the first
time the gtk button is pressed after it's initial launch.

I ran strace on the Perl/Tk apps, to see what happens differently when
it seg-faults. Each time the lines

readv(3, [{"_GTK_LOAD_ICONTHEMES", 20}, {"", 0}], 2) = 20
select(4, [3], [], [], NULL)            = 1 (in [3])
ioctl(3, FIONREAD, [32])                = 0
read(3, "\241 \220\33\1\0 \2\313\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

appear, and the only thing obvious is
readv(3, [{"_GTK_LOAD_ICONTHEMES", 20}, {"", 0}], 2) = 20

So why does my Perl/Tk app get the _GTK_LOAD_ICONTHEME
command? Why does my Tk app die, should'nt the Gtk2 app
die if the c-lib is running over it's memory boundaries?

Any answers other than to revert to an earlier gtk+ version?

Thanks.

-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]