Re: [gtk-list] Re: Gtk--: (resend) recent changes with GTK_OBJECT _CONSTRUCTED ??





Hi Tim,

thanks for your explanation of what GTK_OBJECT_CONSTRUCTED is
actually used for ...

> i think the code to blame here is most probably the Gtk-- object construction
> stuff, we need to know what widget is created wrongly here though.
>
> try to debug your program and in gdb you do:
>
> 1395      g_return_if_fail (GTK_IS_WIDGET (widget));
> (gdb) n
> 1396      g_return_if_fail (GTK_OBJECT_CONSTRUCTED (widget));
> (gdb) n
> > Gtk-CRITICAL **: file gtkwidget.c: line 1396 (gtk_widget_destroy): assertion
> > `GTK_OBJECT_CONSTRUCTED (widget)' failed.
> 1398      gtk_object_destroy ((GtkObject*) widget);
> > 1399    }
> (gdb) print *(GtkWidgetClass*)widget->object.klass

here it comes ... I should probably mention that this output is not the little
test program I posted a few days ago but from a dialog used in terraform ... I
found myself at work today (Saturday morning) and only had the terraform
source available ...

Greetings & Thanks
--> Robert

------------------ gdb output ---------------------
Breakpoint 1, gtk_widget_destroy (widget=0x829a8e8) 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) print *(GtkWidgetClass*)widget->object.klass
$1 = {parent_class = {type = 48917, signals = 0x0, nsignals = 0, n_args = 0,
    construct_args = 0x0, set_arg = 0, get_arg = 0,
    shutdown = 0x810a63c <gtk_widget_shutdown>,
    destroy = 0x80a7d98 <Gtk_Object_Class::destroy_callback(_GtkObject *)>,
    finalize = 0x80e7704 <gtk_range_finalize>}, activate_signal = 0,
  set_scroll_adjustments_signal = 0,
  show = 0x80afb9c <Gtk_Widget_Class::show_callback(_GtkWidget *)>,
  show_all = 0x80afc18 <Gtk_Widget_Class::show_all_callback(_GtkWidget *)>,
  hide = 0x80afc94 <Gtk_Widget_Class::hide_callback(_GtkWidget *)>,
  hide_all = 0x80afd10 <Gtk_Widget_Class::hide_all_callback(_GtkWidget *)>,
  map = 0x80afd8c <Gtk_Widget_Class::map_callback(_GtkWidget *)>,
  unmap = 0x80afe08 <Gtk_Widget_Class::unmap_callback(_GtkWidget *)>,
  realize = 0x80afe84 <Gtk_Widget_Class::realize_callback(_GtkWidget *)>,
  unrealize = 0x80aff00 <Gtk_Widget_Class::unrealize_callback(_GtkWidget *)>,
  draw = 0x80aff80 <Gtk_Widget_Class::draw_callback(_GtkWidget *, _GdkRectangle
*)>,
  draw_focus = 0x80b0000 <Gtk_Widget_Class::draw_focus_callback(_GtkWidget *)>,
draw_default = 0x80b007c <Gtk_Widget_Class::draw_default_callback(_GtkWidget
*)>,
  size_request = 0x80b00fc <Gtk_Widget_Class::size_request_callback(_GtkWidget
*, _GtkRequisition *)>,
  size_allocate = 0x80b0180 <Gtk_Widget_Class::size_allocate_callback(_GtkWidget
 *, _GtkAllocation *)>,
---Type <return> to continue, or q <return> to quit---
  state_changed = 0x80b0204 <Gtk_Widget_Class::state_changed_callback(_GtkWidget
 *, GtkStateType)>,
  parent_set = 0x80acfc0 <Gtk_Widget_Class::parent_set_c_callback(_GtkWidget *,
_GtkWidget *)>,
  style_set = 0x80ad0dc <Gtk_Widget_Class::style_set_c_callback(_GtkWidget *,
_GtkStyle *)>, add_accelerator = 0x80b8b0c <gtk_accel_group_handle_add>,
  remove_accelerator = 0x80b8db4 <gtk_accel_group_handle_remove>,
  grab_focus = 0x8107df4 <gtk_widget_real_grab_focus>,
  event = 0x80b0298 <Gtk_Widget_Class::event_callback(_GtkWidget *, _GdkEvent
*)>,
  button_press_event = 0x80b0338
<Gtk_Widget_Class::button_press_event_callback(_GtkWidget *, _GdkEventButton
*)>,
  button_release_event = 0x80b03d8
<Gtk_Widget_Class::button_release_event_callback(_GtkWidget *, _GdkEventButton
*)>,
  motion_notify_event = 0x80b0478
<Gtk_Widget_Class::motion_notify_event_callback(_GtkWidget *, _GdkEventMotion
*)>,
  delete_event = 0x80b0518 <Gtk_Widget_Class::delete_event_callback(_GtkWidget
*, _GdkEventAny *)>, destroy_event = 0,
  expose_event = 0x80b05b8 <Gtk_Widget_Class::expose_event_callback(_GtkWidget
*, _GdkEventExpose *)>,
  key_press_event = 0x80b0658
<Gtk_Widget_Class::key_press_event_callback(_GtkWidget *, _GdkEventKey *)>,
  key_release_event = 0x80b06f8
<Gtk_Widget_Class::key_release_event_callback(_G---Type <return> to continue, or
 q <return> to quit---
tkWidget *, _GdkEventKey *)>,
  enter_notify_event = 0x80b0798
<Gtk_Widget_Class::enter_notify_event_callback(_GtkWidget *, _GdkEventCrossing
*)>,
  leave_notify_event = 0x80b0838
<Gtk_Widget_Class::leave_notify_event_callback(_GtkWidget *, _GdkEventCrossing
*)>,
  configure_event = 0x80b08d8
<Gtk_Widget_Class::configure_event_callback(_GtkWidget *, _GdkEventConfigure
*)>,
  focus_in_event = 0x80b0978
<Gtk_Widget_Class::focus_in_event_callback(_GtkWidget *, _GdkEventFocus *)>,
  focus_out_event = 0x80b0a18
<Gtk_Widget_Class::focus_out_event_callback(_GtkWidget *, _GdkEventFocus *)>,
  map_event = 0x80b0ab8 <Gtk_Widget_Class::map_event_callback(_GtkWidget *,
_GdkEventAny *)>,
  unmap_event = 0x80b0b58 <Gtk_Widget_Class::unmap_event_callback(_GtkWidget *,
_GdkEventAny *)>,
  property_notify_event = 0x80b0bf8
<Gtk_Widget_Class::property_notify_event_callback(_GtkWidget *,
_GdkEventProperty *)>,
  selection_clear_event = 0x80b0c98
<Gtk_Widget_Class::selection_clear_event_callback(_GtkWidget *,
_GdkEventSelection *)>,
  selection_request_event = 0x80b0d38
<Gtk_Widget_Class::selection_request_event_callback(_GtkWidget *,
_GdkEventSelection *)>,
  selection_notify_event = 0x80b0dd8
<Gtk_Widget_Class::selection_notify_event_callback(_GtkWidget *,
_GdkEventSelection *)>,
---Type <return> to continue, or q <return> to quit---
  proximity_in_event = 0x80b0e78
<Gtk_Widget_Class::proximity_in_event_callback(_GtkWidget *, _GdkEventProximity
*)>,
  proximity_out_event = 0x80b0f18
<Gtk_Widget_Class::proximity_out_event_callback(_GtkWidget *, _GdkEventProximity
 *)>,
  visibility_notify_event = 0x80b10f8
<Gtk_Widget_Class::visibility_notify_event_callback(_GtkWidget *,
_GdkEventVisibility *)>,
  client_event = 0x80b0fb8 <Gtk_Widget_Class::client_event_callback(_GtkWidget
*, _GdkEventClient *)>,
  no_expose_event = 0x80b1058
<Gtk_Widget_Class::no_expose_event_callback(_GtkWidget *, _GdkEventAny *)>,
  selection_get = 0x80b121c <Gtk_Widget_Class::selection_get_callback(_GtkWidget
 *, _GtkSelectionData *, unsigned int, unsigned int)>,
  selection_received = 0x80b12b0
<Gtk_Widget_Class::selection_received_callback(_GtkWidget *, _GtkSelectionData
*, unsigned int)>,
  drag_begin = 0x80b133c <Gtk_Widget_Class::drag_begin_callback(_GtkWidget *,
_GdkDragContext *)>,
  drag_end = 0x80b13c8 <Gtk_Widget_Class::drag_end_callback(_GtkWidget *,
_GdkDragContext *)>,
  drag_data_get = 0x80b145c <Gtk_Widget_Class::drag_data_get_callback(_GtkWidget
 *, _GdkDragContext *, _GtkSelectionData *, unsigned int, unsigned int)>,
  drag_data_delete = 0x80b14f0
<Gtk_Widget_Class::drag_data_delete_callback(_GtkWidget *, _GdkDragContext *)>,
  drag_leave = 0x80b1580 <Gtk_Widget_Class::drag_leave_callback(_GtkWidget *,
_G---Type <return> to continue, or q <return> to quit---
dkDragContext *, unsigned int)>,
  drag_motion = 0x80b161c <Gtk_Widget_Class::drag_motion_callback(_GtkWidget *,
_GdkDragContext *, int, int, unsigned int)>,
  drag_drop = 0x80b16c0 <Gtk_Widget_Class::drag_drop_callback(_GtkWidget *,
_GdkDragContext *, int, int, unsigned int)>,
  drag_data_received = 0x80b1768
<Gtk_Widget_Class::drag_data_received_callback(_GtkWidget *, _GdkDragContext *,
int, int, _GtkSelectionData *, unsigned int, unsigned int)>,
  debug_msg = 0x80b1188 <Gtk_Widget_Class::debug_msg_callback(_GtkWidget *, char
 const *)>, pad1 = 0, pad2 = 0, pad3 = 0, pad4 = 0}
(gdb)
(gdb)




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