Re: invalid object

Tr, 2001-10-10 10:32, Gediminas Paulauskas rašė:
> Sorry for a stupid question, I lost hope to understand..
> I have created a widget HistoryWindow, derived from GnomeDialog. It
> works fine, casts like GNOME_DIALOG (hw) are ok, but when I close the
> dialog, get these warnings:
> GnomeUI-CRITICAL **: file gnome-dialog.c: line 1060
> (gnome_dialog_destroy): assertion `GNOME_IS_DIALOG(dialog)' failed.
> Gtk-WARNING **: invalid unclassed pointer in cast to `GtkObject'
> Gtk-CRITICAL **: file gtkobject.c: line 1070
> (gtk_object_get_data_by_id): assertion `GTK_IS_OBJECT (object)' failed.
> Gtk-CRITICAL **: file gtkobject.c: line 1172 (gtk_object_unref):
> assertion `GTK_IS_OBJECT (object)' failed.
> Gtk-CRITICAL **: file gtkobject.c: line 1172 (gtk_object_unref):
> assertion `GTK_IS_OBJECT (object)' failed.
> GnomeUI-CRITICAL **: file gnome-dialog.c: line 1007
> (gnome_dialog_button_clicked): assertion `GNOME_IS_DIALOG(dialog)'
> failed.

This is a backtrace, nothing unusual ("Close" button was clicked, and
"destroy" handler is called)

#0  0x403b8609 in gnome_dialog_destroy ()
   from /home/menesis/INSTALL/lib/
#1  0x400efdc5 in gtk_marshal_NONE__NONE (object=0x8130be8, 
    func=0x403b8600 <gnome_dialog_destroy>, func_data=0x0,
    at gtkmarshal.c:312
#2  0x4011f6f3 in gtk_signal_real_emit (object=0x8130be8, signal_id=1, 
    params=0xbfffe70c) at gtksignal.c:1492
#3  0x4011d793 in gtk_signal_emit (object=0x8130be8, signal_id=1)
    at gtksignal.c:552
#4  0x40101e0b in gtk_object_shutdown (object=0x8130be8) at
#5  0x40158da3 in gtk_widget_shutdown (object=0x8130be8) at
#6  0x4015b998 in gtk_window_shutdown (object=0x8130be8) at
#7  0x40101daa in gtk_object_destroy (object=0x8130be8) at
#8  0x401517b9 in gtk_widget_destroy (widget=0x8130be8) at
#9  0x400efdc5 in gtk_marshal_NONE__NONE (object=0x8130be8, 
    func=0x80579c4 <gtk_widget_destroy>, func_data=0x813c1b0,
    at gtkmarshal.c:312
#10 0x40120257 in gtk_handlers_run (handlers=0x8125780,
    object=0x813c1b0, params=0xbfffeb9c, after=0) at gtksignal.c:1917
#11 0x4011f6b5 in gtk_signal_real_emit (object=0x813c1b0, signal_id=68, 
    params=0xbfffeb9c) at gtksignal.c:1477
#12 0x4011d793 in gtk_signal_emit (object=0x813c1b0, signal_id=68)
    at gtksignal.c:552
#13 0x4008a118 in gtk_button_clicked (button=0x813c1b0) at
#14 0x4008b69d in gtk_real_button_released (button=0x813c1b0)
    at gtkbutton.c:861
#15 0x400efdc5 in gtk_marshal_NONE__NONE (object=0x813c1b0, 
    func=0x4008b5fc <gtk_real_button_released>, func_data=0x0,
    at gtkmarshal.c:312
#16 0x4011f54f in gtk_signal_real_emit (object=0x813c1b0, signal_id=67, 
    params=0xbfffef4c) at gtksignal.c:1440
#17 0x4011d793 in gtk_signal_emit (object=0x813c1b0, signal_id=67)
    at gtksignal.c:552
#18 0x4008a058 in gtk_button_released (button=0x813c1b0) at
#19 0x4008b008 in gtk_button_button_release (widget=0x813c1b0,
    at gtkbutton.c:721
#20 0x400efa4f in gtk_marshal_BOOL__POINTER (object=0x813c1b0, 
    func=0x4008af3c <gtk_button_button_release>, func_data=0x0, 
    args=0xbffff30c) at gtkmarshal.c:28
#21 0x4011f6f3 in gtk_signal_real_emit (object=0x813c1b0, signal_id=27, 
    params=0xbffff30c) at gtksignal.c:1492
#22 0x4011d793 in gtk_signal_emit (object=0x813c1b0, signal_id=27)
    at gtksignal.c:552
#23 0x40154fdb in gtk_widget_event (widget=0x813c1b0, event=0x8121328)
    at gtkwidget.c:2864
#24 0x400ef995 in gtk_propagate_event (widget=0x813c1b0,
#25 0x400eeabe in gtk_main_do_event (event=0x8121328) at gtkmain.c:818
#26 0x4019fc27 in gdk_event_dispatch (source_data=0x0, 
    current_time=0xbffff704, user_data=0x0) at gdkevents.c:2143
#27 0x401d0588 in g_main_dispatch (dispatch_time=0xbffff704) at
#28 0x401d0b93 in g_main_iterate (block=1, dispatch=1) at gmain.c:877
#29 0x401d0d2c in g_main_run (loop=0x80e9650) at gmain.c:935
#30 0x400ee387 in gtk_main () at gtkmain.c:524
#31 0x08068d59 in main (argc=2, argv=0xbffff834) at gnomeicu.c:792
#32 0x405b46ef in __libc_start_main () from /lib/

The strange thing is that in gtk_signal_real_emit, after
gtk_handlers_run call, object->klass becomes 0, so in the line

signal.marshaller (object, signal_func, NULL, params);

object is already invalid. signal.marshaller is a call to
gnome_dialog_destroy, and type checks at the start fail.

How could there be any failure in my code, which leads to such
mysterious things I cannot fix?

The widget code is in

Thanks for anyone trying to help

Gediminas Paulauskas
Kaunas, Lithuania

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