Simple Gtk crashes....
- From: Nikhil Hegde <nikhil utdallas edu>
- To: gtk-app-devel-list gnome org
- Subject: Simple Gtk crashes....
- Date: Wed, 7 Nov 2001 10:08:31 -0600 (CST)
Hi,
I am trying to run the following basic program, but it
dumps core. The gtk version is 1.2.3. Machine is
SunOS helena 5.6 Generic_105181-28 sun4u sparc SUNW,Ultra-5_10
The same program works fine in other machines with similar
configuration. I suspect gtk installation being faulty. But
am not able to figure it out. Any help is appreciated.
Thanks,
Nikhil Hegde
==================================================
Source file is as below. After that, I have attached the stack
generated by using gdb on the core file.
-----------------------------------------------------
void main(gint argc, gchar *argv[])
{
gint x, y;
guchar *pos;
gchar ch1,ch2;
gtk_init (&argc, &argv);
gdk_rgb_set_verbose (TRUE);
gdk_rgb_init();
rgbbuf = readImage("tmpFile");
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
// window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
window = gtk_widget_new (gtk_window_get_type (),
"GtkObject::user_data", NULL,
"GtkWindow::type", GTK_WINDOW_TOPLEVEL,
"GtkWindow::title", "postproc",
"GtkWindow::allow_shrink", FALSE,
NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) quit_func, NULL);
darea = gtk_drawing_area_new();
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), Width, Height);
gtk_container_add (GTK_CONTAINER (window), darea);
gtk_signal_connect (GTK_OBJECT (darea), "expose-event",
GTK_SIGNAL_FUNC (on_darea_expose), NULL);
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(cb_destroy), window);
gtk_widget_show_all (window);
gtk_main();
return;
}
-------------------------------------------------
When I run it I get .....
$ image
Gdk-ERROR **: BadMatch (invalid parameter attributes)
serial 44 error_code 8 request_code 1 minor_code 0
aborting...
Abort (core dumped)
----------------------------------------------------
Gdb trace .....
(gdb) bt
#0 0xef28a5f0 in _kill ()
#1 0xef23b330 in abort ()
#2 0xef568a44 in g_logv (log_domain=0xef5debd8 "Gdk",
log_level=G_LOG_LEVEL_ERROR, format=0x0, args1=0x6)
at gmessages.c:389
#3 0xef568ae0 in g_log (log_domain=0xef5debd8 "Gdk",
log_level=G_LOG_LEVEL_ERROR,
format=0xef5dec88 "%s\n serial %ld error_code %d request_code %d
minor_code %d\n") at gmessages.c:406
#4 0xef5bc068 in gdk_x_error (display=0xef5debd8, error=0xefffdfc8)
at gdk.c:1043
#5 0xef43ead8 in _XError ()
#6 0xef43cbd4 in _XReply ()
#7 0xef4255f8 in XInternAtom ()
#8 0xef5d3508 in gdk_atom_intern (
atom_name=0xef5e56e0 "WM_CLIENT_LEADER", only_if_exists=0)
at gdkproperty.c:46
#9 0xef5da790 in gdk_window_new (parent=0xef5f8400,
attributes=0xefffe330, attributes_mask=226) at gdkwindow.c:465
#10 0xef74cb10 in gtk_window_realize (widget=0xa6d58)
at gtkwindow.c:871
#11 0xef74fd60 in gtk_marshal_NONE__NONE (object=0xa6d58,
func=0xef74c93c <gtk_window_realize>, func_data=0x0,
args=0xefffe4f0) at gtkmarshal.c:363
#12 0xef6fc394 in gtk_signal_real_emit (object=0xa6d58, signal_id=6,
params=0xefffe4f0) at gtksignal.c:1432
#13 0xef6f9770 in gtk_signal_emit (object=0xa6d58, signal_id=6)
at gtksignal.c:552
#14 0xef73e490 in gtk_widget_realize (widget=0xa6d58)
at gtkwidget.c:1658
#15 0xef73dfa4 in gtk_widget_map (widget=0xa6d58) at gtkwidget.c:1597
#16 0xef74c4d0 in gtk_window_show (widget=0xa6d58) at gtkwindow.c:766
#17 0xef74fd60 in gtk_marshal_NONE__NONE (object=0xa6d58,
func=0xef74c3ac <gtk_window_show>, func_data=0x0, args=0xefffeae8)
at gtkmarshal.c:363
#18 0xef6fc394 in gtk_signal_real_emit (object=0xa6d58, signal_id=2,
params=0xefffeae8) at gtksignal.c:1432
#19 0xef6f9770 in gtk_signal_emit (object=0xa6d58, signal_id=2)
at gtksignal.c:552
#20 0xef73d314 in gtk_widget_show (widget=0xa6d58) at gtkwidget.c:1440
---Type <return> to continue, or q <return> to quit---
#21 0xef66e410 in gtk_container_show_all (widget=0xa6d58)
at gtkcontainer.c:1843
#22 0xef73dcbc in gtk_widget_show_all (widget=0xa6d58)
at gtkwidget.c:1563
#23 0x11604 in init (argc=1, argv=0xeffff0c4) at image.c:67
#24 0x111a0 in main (argc=1, argv=0xeffff0c4) at image.c:8
-------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]