GNOME Bugzilla – Bug 87912
Warning on dialog destruction
Last modified: 2004-12-22 21:47:04 UTC
I have a quite simple program trying to create a dialog with help of gtkmm and libglademm. In the response handler I want to delete the 'Dlg' object, since it is no longer needed. This seems to cause a segfault (it doesn't segfault when I remove the 'delete this'.
Created attachment 9840 [details] Andi's files to reproduce the bug...
I don't see why you should expect "delete this" to be safe at random points in your code. You should simplify the example further anyway, in particular so that we know whether libglademm has anything to do with this.
I'm closing this because the example given is so strange. I don't even see how the application is supposed to stop without segfaulting.
I have rewritten the test program to work with only gtkmm. It now shows a different behaviour, issueing this warning: GLib-GObject-WARNING **: gsignal.c:1705:g_signal_handler_disconnect(): instance `0x807b7b0' has no handler with id `8' nevertheless i think this is related to the original bug.
Created attachment 9947 [details] Program showing bug (new, the 'warning' bug)
I'm still not happy about the "delete this". I'd expect it to at least eb the last thing that the class does. Also, the Gtk::Dialog is not deleted anywhere.
Please test with the latest gtkmm. I just committed some quite major internals changes that might make a difference.
Tried it. No change.
Warning fixed: 2002-07-19 Murray Cumming <murrayc@usa.net> * glib/glibmm/signalproxy_connectionnode.cc: Fix for bug #87912: While disconnecting the gsignal, avoid a "not connected" warning by checking first. GTK+ seems to sometimes disconnect signals _before_ calling the destroy notify callback for that object. It's rare (the bug example uses delete this), and is just a check, so it seems harmless.