Re: [gtk-list] Re: Gtk--: (resend) recent changes with GTK_OBJECT_CONSTRUCTED ??
- From: Robert_Gasch/PeopleSoft peoplesoft com
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Gtk--: (resend) recent changes with GTK_OBJECT_CONSTRUCTED ??
- Date: Thu, 11 Mar 1999 10:09:11 +0100
> > Robert Gasch wrote:
> > some code that used to work for quite a while without problems is partially
> > broken
> > since my latest upgrade to Gtk+ 1.1.16 and Gtk-- 0.11.2. I have some dialog
> > boxes
> > that override the delete_impl method with the following code:
> > this->hide();
> > return;
> >
> > This used to work fine (it still works), but now gives me the following
> > error/warning:
> >
> > Gtk-CRITICAL **: file gtkwidget.c: line 1388 (gtk_widget_destroy):
> > assertion `GTK_OBJECT_CONSTRUCTED (widget)' failed.
> looks like it calls gtk_widget_destroy twice for same object. (or maybe the
> object is poorly constructed..)
I don't think so (at least not in my code) ...
> It would help to find the problem if we had stack dumps of the call to
> that gtk_widget_destroy where the error happens.
> (gdb ./myproggy ; break gtk_widget_destroy ; condition 1
!GTK_OBJECT_CONSTRUCTED(widget) ; run ; where)
Please see the attached stack trace ...
> I dunno what has changed - but it might be that gtk+ now more strictly catches
> problems in this area -- we should look into it more carefully.. :)
Yes, I will try to further remove extraneous code from my testcase and see if
points us/you/anybody in the right direction ...
Thanks for all the help
--> Robert
---------------------- stack trace --------------------------
Breakpoint 1, gtk_widget_destroy (widget=0x8299310) at gtkwidget.c:1394
1394 g_return_if_fail (widget != NULL);
(gdb)
1395 g_return_if_fail (GTK_IS_WIDGET (widget));
(gdb)
1396 g_return_if_fail (GTK_OBJECT_CONSTRUCTED (widget));
(gdb)
Gtk-CRITICAL **: file gtkwidget.c: line 1396 (gtk_widget_destroy): assertion
`GTK_OBJECT_CONSTRUCTED (widget)' failed.
1399 }
(gdb) gtk_box_forall (container=0x8298260, include_internals=0,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbox.c:791
791 }
(gdb) 0x80a83e0 792 }
(gdb) gtk_container_foreach (container=0x8298260,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
at gtkcontainer.c:1103
1103 }
(gdb)
gtk_container_destroy (object=0x8298260) at gtkcontainer.c:628
628 if (GTK_OBJECT_CLASS (parent_class)->destroy)
(gdb)
629 (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
(gdb) where
#0 gtk_container_destroy (object=0x8298260) at gtkcontainer.c:629
#1 0x8093b40 in Gtk_Object::destroy_impl (this=0x8291074) at object.cc:440
#2 0x8093b85 in Gtk_Object_Class::destroy_callback (o=0x8298260)
at object.cc:447
#3 0x80fb4e6 in gtk_marshal_NONE__NONE (object=0x8298260,
func=0x8093b48 <Gtk_Object_Class::destroy_callback(_GtkObject *)>,
func_data=0x0, args=0xbfffe154) at gtkmarshal.c:344
#4 0x80de9ad in gtk_signal_real_emit (object=0x8298260, signal_id=1,
params=0xbfffe154) at gtksignal.c:1484
#5 0x80dd0ca in gtk_signal_emit (object=0x8298260, signal_id=1)
at gtksignal.c:552
#6 0x80cea55 in gtk_object_shutdown (object=0x8298260) at gtkobject.c:255
#7 0x80f730e in gtk_widget_shutdown (object=0x8298260) at gtkwidget.c:4329
#8 0x80cea14 in gtk_object_destroy (object=0x8298260) at gtkobject.c:246
#9 0x80f173d in gtk_widget_destroy (widget=0x8298260) at gtkwidget.c:1398
#10 0x80a83aa in gtk_box_forall (container=0x8297e78, include_internals=0,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbox.c:780
#11 0x80acc2f in gtk_container_foreach (container=0x8297e78,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
at gtkcontainer.c:1102
#12 0x80abf83 in gtk_container_destroy (object=0x8297e78) at gtkcontainer.c:626
#13 0x8093b40 in Gtk_Object::destroy_impl (this=0x829085c) at object.cc:440
#14 0x8093b85 in Gtk_Object_Class::destroy_callback (o=0x8297e78)
---Type <return> to continue, or q <return> to quit---
at object.cc:447
#15 0x80fb4e6 in gtk_marshal_NONE__NONE (object=0x8297e78,
func=0x8093b48 <Gtk_Object_Class::destroy_callback(_GtkObject *)>,
func_data=0x0, args=0xbfffe520) at gtkmarshal.c:344
#16 0x80de9ad in gtk_signal_real_emit (object=0x8297e78, signal_id=1,
params=0xbfffe520) at gtksignal.c:1484
#17 0x80dd0ca in gtk_signal_emit (object=0x8297e78, signal_id=1)
at gtksignal.c:552
#18 0x80cea55 in gtk_object_shutdown (object=0x8297e78) at gtkobject.c:255
#19 0x80f730e in gtk_widget_shutdown (object=0x8297e78) at gtkwidget.c:4329
#20 0x80cea14 in gtk_object_destroy (object=0x8297e78) at gtkobject.c:246
#21 0x80f173d in gtk_widget_destroy (widget=0x8297e78) at gtkwidget.c:1398
#22 0x80a700d in gtk_bin_forall (container=0x829c690, include_internals=0,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbin.c:276
#23 0x80acc2f in gtk_container_foreach (container=0x829c690,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
at gtkcontainer.c:1102
#24 0x80abf83 in gtk_container_destroy (object=0x829c690) at gtkcontainer.c:626
#25 0x8093b40 in Gtk_Object::destroy_impl (this=0x829bef8) at object.cc:440
#26 0x8093b85 in Gtk_Object_Class::destroy_callback (o=0x829c690)
at object.cc:447
#27 0x80fb4e6 in gtk_marshal_NONE__NONE (object=0x829c690,
func=0x8093b48 <Gtk_Object_Class::destroy_callback(_GtkObject *)>,
---Type <return> to continue, or q <return> to quit---
func_data=0x0, args=0xbfffe8e8) at gtkmarshal.c:344
#28 0x80de9ad in gtk_signal_real_emit (object=0x829c690, signal_id=1,
params=0xbfffe8e8) at gtksignal.c:1484
#29 0x80dd0ca in gtk_signal_emit (object=0x829c690, signal_id=1)
at gtksignal.c:552
#30 0x80cea55 in gtk_object_shutdown (object=0x829c690) at gtkobject.c:255
#31 0x80f730e in gtk_widget_shutdown (object=0x829c690) at gtkwidget.c:4329
#32 0x80cea14 in gtk_object_destroy (object=0x829c690) at gtkobject.c:246
#33 0x80f173d in gtk_widget_destroy (widget=0x829c690) at gtkwidget.c:1398
#34 0x80a83aa in gtk_box_forall (container=0x8296620, include_internals=0,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbox.c:780
#35 0x80acc2f in gtk_container_foreach (container=0x8296620,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
at gtkcontainer.c:1102
#36 0x80abf83 in gtk_container_destroy (object=0x8296620) at gtkcontainer.c:626
#37 0x80fb4e6 in gtk_marshal_NONE__NONE (object=0x8296620,
func=0x80abef0 <gtk_container_destroy>, func_data=0x0, args=0xbfffec94)
at gtkmarshal.c:344
#38 0x80de9ad in gtk_signal_real_emit (object=0x8296620, signal_id=1,
params=0xbfffec94) at gtksignal.c:1484
#39 0x80dd0ca in gtk_signal_emit (object=0x8296620, signal_id=1)
at gtksignal.c:552
#40 0x80cea55 in gtk_object_shutdown (object=0x8296620) at gtkobject.c:255
---Type <return> to continue, or q <return> to quit---
#41 0x80f730e in gtk_widget_shutdown (object=0x8296620) at gtkwidget.c:4329
#42 0x80cea14 in gtk_object_destroy (object=0x8296620) at gtkobject.c:246
#43 0x80f173d in gtk_widget_destroy (widget=0x8296620) at gtkwidget.c:1398
#44 0x80a700d in gtk_bin_forall (container=0x8296590, include_internals=0,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbin.c:276
#45 0x80acc2f in gtk_container_foreach (container=0x8296590,
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
at gtkcontainer.c:1102
#46 0x80abf83 in gtk_container_destroy (object=0x8296590) at gtkcontainer.c:626
#47 0x80f97cd in gtk_window_destroy (object=0x8296590) at gtkwindow.c:739
#48 0x8093b40 in Gtk_Object::destroy_impl (this=0x828ef48) at object.cc:440
#49 0x8093b85 in Gtk_Object_Class::destroy_callback (o=0x8296590)
at object.cc:447
#50 0x80fb4e6 in gtk_marshal_NONE__NONE (object=0x8296590,
func=0x8093b48 <Gtk_Object_Class::destroy_callback(_GtkObject *)>,
func_data=0x0, args=0xbffff06c) at gtkmarshal.c:344
#51 0x80de9ad in gtk_signal_real_emit (object=0x8296590, signal_id=1,
params=0xbffff06c) at gtksignal.c:1484
#52 0x80dd0ca in gtk_signal_emit (object=0x8296590, signal_id=1)
at gtksignal.c:552
#53 0x80cea55 in gtk_object_shutdown (object=0x8296590) at gtkobject.c:255
#54 0x80f730e in gtk_widget_shutdown (object=0x8296590) at gtkwidget.c:4329
#55 0x80f9238 in gtk_window_shutdown (object=0x8296590) at gtkwindow.c:565
---Type <return> to continue, or q <return> to quit---
#56 0x80cea14 in gtk_object_destroy (object=0x8296590) at gtkobject.c:246
#57 0x80f173d in gtk_widget_destroy (widget=0x8296590) at gtkwidget.c:1398
#58 0x80c139f in gtk_main_do_event (event=0x828c7e8) at gtkmain.c:679
#59 0x8116613 in gdk_event_dispatch (source_data=0x0, current_time=0xbffff3d4,
user_data=0x0) at gdkevents.c:2086
#60 0x8128e92 in g_main_dispatch (current_time=0xbffff3d4) at gmain.c:647
#61 0x812935d in g_main_iterate (block=1, dispatch=1) at gmain.c:854
#62 0x812946f in g_main_run (loop=0x828c778) at gmain.c:912
#63 0x80c107b in gtk_main () at gtkmain.c:475
#64 0x808e8a8 in Gtk_Main::run (this=0xbffff42c) at main.gen_h:52
#65 0x8084aa1 in main (argc=1, argv=0xbffff474) at terraform.cc:198
(gdb)
(gdb) q
The program is running. Exit anyway? (y or n) y
Running it through "grep ttk_widget_destroy":
#9 0x80f173d in gtk_widget_destroy (widget=0x8298260) at gtkwidget.c:1398
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbox.c:780
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
#21 0x80f173d in gtk_widget_destroy (widget=0x8297e78) at gtkwidget.c:1398
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbin.c:276
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
#33 0x80f173d in gtk_widget_destroy (widget=0x829c690) at gtkwidget.c:1398
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbox.c:780
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
#43 0x80f173d in gtk_widget_destroy (widget=0x8296620) at gtkwidget.c:1398
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0) at gtkbin.c:276
callback=0x80f16a8 <gtk_widget_destroy>, callback_data=0x0)
#57 0x80f173d in gtk_widget_destroy (widget=0x8296590) at gtkwidget.c:1398
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]