After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 87912 - Warning on dialog destruction
Warning on dialog destruction
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-07-11 12:26 UTC by Andreas Rottmann
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Andi's files to reproduce the bug... (2.35 KB, application/octet-stream)
2002-07-13 11:04 UTC, Martin Schulze
Details
Program showing bug (new, the 'warning' bug) (921 bytes, text/plain)
2002-07-18 15:30 UTC, Andreas Rottmann
Details

Description Andreas Rottmann 2002-07-11 12:26:35 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'.
Comment 1 Martin Schulze 2002-07-13 11:04:58 UTC
Created attachment 9840 [details]
Andi's files to reproduce the bug...
Comment 2 Murray Cumming 2002-07-13 19:39:13 UTC
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.
Comment 3 Murray Cumming 2002-07-18 07:16:13 UTC
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.
Comment 4 Andreas Rottmann 2002-07-18 14:21:43 UTC
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.
Comment 5 Andreas Rottmann 2002-07-18 15:30:13 UTC
Created attachment 9947 [details]
Program showing bug (new, the 'warning' bug)
Comment 6 Murray Cumming 2002-07-18 18:31:14 UTC
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.
Comment 7 Murray Cumming 2002-07-18 21:32:44 UTC
Please test with the latest gtkmm. I just committed some quite major
internals changes that might make a difference.
Comment 8 Murray Cumming 2002-07-19 11:40:51 UTC
Tried it. No change.
Comment 9 Murray Cumming 2002-07-19 12:57:22 UTC
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.