need help with perl gtk: segfaults




Hi!

I use gtk 971201 together with the Perl module Gtk-0.1.11. However, in
some situations, I get segmentation faults. If attached an example program
below which segfaults on my system after a few seconds. I get the messages

$ test2.demo.pl

** WARNING **: file gdkwindow.c: line 417 (gdk_window_ref): "window !=
NULL"

** ERROR **: sigsegv caught
$

Any help is appreciated. If necessary, I can provide more details.


Thanks in advance,

Chris


---------cut-here----------
#!/usr/bin/perl

use Carp;
use Gtk;
use Gtk::Atoms;

init Gtk;
$window = new Gtk::Window('toplevel');
$window->realize;
$notebook = new Gtk::Notebook();
$notebook->signal_connect('event', \&notebook_event);
$notebook->set_events(["all-events-mask"]);
$frame1 = new Gtk::Frame("One");
$label1 = new Gtk::Label("One");
$label1->show;
$notebook->append_page($frame1,$label1);
$frame1->show;
$frame2 = new Gtk::Frame("Two");
$label2 = new Gtk::Label("Details");
$label2->show;
$notebook->append_page($frame2,$label2);
$frame2->show;
$window->add($notebook);
$notebook->show;
$window->show;
main Gtk;

sub notebook_event {
  return FALSE;
}
---------cut-here----------


--          _,,     Christian Schwarz
           / o \__   schwarz@monet.m.isar.de, schwarz@schwarz-online.com,
           !   ___;   schwarz@debian.org, schwarz@mathematik.tu-muenchen.de
           \  /        
  \\\______/  !        PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
   \          /         http://fatman.mathematik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,----.-.-
  "DIE ENTE BLEIBT DRAUSSEN!"



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