Re: Segfault in Gtk2::Ex::Simple::List 0.50
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org, perl5-porters perl org
- Subject: Re: Segfault in Gtk2::Ex::Simple::List 0.50
- Date: Mon, 20 Apr 2009 13:10:31 +0200
[CCing perl5-porters.]
jeffrey ratcliffe gmail com wrote:
In the following code, pushing a 0 instead of a Pixbuf provokes a
segfault, but strangely, not in the debugger.
>
#!/usr/bin/perl
use warnings;
use strict;
use Gtk2 -init;
use Gtk2::Ex::Simple::List;
my $win = Gtk2::Window->new;
$win->signal_connect (delete_event => sub { Gtk2->main_quit; });
my $vbox = Gtk2::VBox->new;
$win->add ($vbox);
my $slist = Gtk2::Ex::Simple::List->new ( 'Int' => 'int', 'Pixbuf' => 'pixbuf' );
$vbox->add ($slist);
my $button = Gtk2::Button->new ( 'Add' );
$vbox->add ($button);
$button -> signal_connect(clicked => sub {
push @{$slist->{data}}, [ 1, 0 ]
});
$win->show_all;
Gtk2->main;
On my machine, this only segfaults on perl 5.10.0. It works fine (i.e. it
throws an exception but continues to work) on 5.8.9 and on blead. So
apparently, this is a bug introduced in 5.10.0 that has since been fixed. The
backtrace is:
#0 0x080fe286 in Perl_av_clear (my_perl=0x8f9b008, av=0x9253c1c) at av.c:436
#1 0x081b543d in Perl_leave_scope (my_perl=0x8f9b008, base=22) at scope.c:799
#2 0x081b12a0 in Perl_pop_scope (my_perl=0x8f9b008) at scope.c:99
#3 0x081c5297 in Perl_die_where (my_perl=0x8f9b008,
message=0x9357fb4 "`0' is not of type Gtk2::Gdk::Pixbuf at
/opt/perl-5.10.0-lib/lib/perl5/Gtk2/Ex/Simple/TiedCommon.pm line 65.\n", msglen=109)
at pp_ctl.c:1528
#4 0x080d13a2 in Perl_vcroak (my_perl=0x8f9b008,
pat=0xb7c04f06 "%s is not of type %s", args=0xbfd63c00) at util.c:1386
#5 0x080d16dd in Perl_croak_nocontext (pat=0xb7c04f06 "%s is not of type %s")
at util.c:1404
#6 0xb7ba63c2 in gperl_get_object_check (sv=0x9273e9c, gtype=151780744)
at GObject.xs:916
#7 0xb7bae55a in gperl_value_from_sv (value=0xbfd63d3c, sv=0x9273e9c)
at GValue.xs:137
...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]