GNOME Bugzilla – Bug 163765
Glib::Dispatcher crash
Last modified: 2005-03-14 17:45:34 UTC
If Glib::Dispatcher::emit() is called and then that Glib::Dispatcher object is deleted before the signal is "dispatched" by the main loop, a crash occurs--even if the sigc::connection for that signal has been disconnected. In my code, emit() is being called from a thread. The Glib::Dispatcher is being deleted from the main process. Not that it would make any difference, but this bug appears both under Linux and Win32. Here is a backtrace:
+ Trace 54415
A suitable work-around is to use Glib::signal_timeout() with a timeout value of zero, and binding the return value of the slot to "false". This seems to work rather well in my code.
We really need a test case for this, as simple as possible, and compileable.
Could you create that test case, please?
I apologize, my life got kinda crazy all of the sudden. I will try to get that together over the next day or so.
I'm about to close this bug as invalid.
It does not look like I will be able to get around to making that test case in a timely manner. I should have done that when I was knee-deep in the problem months ago. The work-around worked so well that it became a non-issue in our codebase. I'll go ahead and mark this bug as invalid. I believe that this is a real bug, but seeing that my subconscious seems to be unable to motivate me to make a test case, there it little point in leaving this bug laying around.