Re: Gtk::Widget::on_hide

2013-11-21 Thread Kjell Ahlstedt
On 19/11/2013 15:48, Kjell Ahlstedt wrote: You mentioned in https://mail.gnome.org/archives/gtkmm-list/2013-November/msg00022.html that you have glibmm_Glib::quark_ in the list of GQuarks, when I have glibmm_Glib::quark_cpp_wrapper_deleted_. It's as if

Re: Gtk::Widget::on_hide

2013-11-21 Thread John Emmas
On 21/11/2013 09:17, Kjell Ahlstedt wrote: Getting back to https://mail.gnome.org/archives/gtkmm-list/2013-November/msg00043.html, you say there, before you applied any patches, that gobject_ is set to 0 in Gtk::Object::disconnect_cpp_wrapper(), and then Gtk::Widget::on_unrealize() is

Re: Gtk::Widget::on_hide

2013-11-20 Thread Kjell Ahlstedt
Okay... I just finished applying the patches. I've by no means carried out any exhaustive testing but initial signs are that it's fixed the crashing issue. I'll do some more comprehensive testing tomorrow but my first impression is that this stuff is still some way from working elegantly.

Re: Gtk::Widget::on_hide

2013-11-20 Thread John Emmas
On 20/11/2013 08:43, Kjell Ahlstedt wrote: Calling virtual functions from constructors and destructors is best avoided. It's not always easy to guess which override will be called. Agreed Kjell. I just wanted to draw it to your attention that this was happening. I've done much more

Re: Gtk::Widget::on_hide

2013-11-19 Thread John Emmas
. Getting back to the MyDialog example I supplied yesterday, this is the sequence of function calls when closing MyDialog on my system:- 1) Gtk::Widget::on_hide() // occurs on window closure (BEFORE the call to delete). Therefore 'gobject_' is still valid 2) Window::_destroy_c_instance

Re: Gtk::Widget::on_hide

2013-11-19 Thread Kjell Ahlstedt
added an update about what I found. Getting back to the MyDialog example I supplied yesterday, this is the sequence of function calls when closing MyDialog on my system:- 1) Gtk::Widget::on_hide() // occurs on window closure (BEFORE the call to delete). Therefore 'gobject_' is still valid 2

Re: Gtk::Widget::on_hide

2013-11-19 Thread John Emmas
Many thanks for persevering with this Kjell. I'm just about to try applying the patches that Murray recommended here:- https://bugzilla.gnome.org/show_bug.cgi?id=605728#c25 and I'll report back if that changes anything. It's good that I keep getting more and more info and things to try.

Re: Gtk::Widget::on_hide

2013-11-19 Thread John Emmas
On 19/11/2013 16:56, John Emmas wrote: Many thanks for persevering with this Kjell. I'm just about to try applying the patches that Murray recommended here:- https://bugzilla.gnome.org/show_bug.cgi?id=605728#c25 and I'll report back if that changes anything. Okay... I just finished

Gtk::Widget::on_hide

2013-11-18 Thread John Emmas
I'm trying to debug a program which keeps crashing in 'Gtk::Widget::on_hide()'. Here's what that function looks like:- void Gtk::Widget::on_hide() { BaseClassType *const base = static_castBaseClassType*( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get

Re: Gtk::Widget::on_hide

2013-11-18 Thread John Emmas
; // --- crashes here !! return 0; } When built using MSVC and gtkmm v2.24.2, the extended example consistently crashes at the line delete mainWnd;. It either crashes in Gtk::Widget::on_hide() or slightly later, in Gtk::Widget::on_unrealize(). It's almost as if the C++ window object

Re: Gtk::Widget::on_hide

2013-11-18 Thread Kjell Ahlstedt
was fixed in 3.8.1. 2. Your program calls Gtk::Widget::on_hide(). You should not do that unless you really know what you're doing. on_hide() is the default signal handler of the hide signal. If you want to, you can override it in a derived class, and wait for it to be called when the hide signal

Re: Gtk::Widget::on_hide

2013-11-18 Thread Kjell Ahlstedt
crashes at the line delete mainWnd;. It either crashes in Gtk::Widget::on_hide() or slightly later, in Gtk::Widget::on_unrealize(). It's almost as if the C++ window object is going out of scope before gtkmm has finished its cleanup. Could this be a threading issue? I haven't created any threads

Re: Gtk::Widget::on_hide

2013-11-18 Thread John Emmas
on that previous issue and report back what I find. On 18/11/2013 18:03, Kjell Ahlstedt wrote: 1. There is a bug in gtkmm 3.7.12 and 3.8.0 that can make such a call happen. See https://bugzilla.gnome.org/show_bug.cgi?id=605728#c5 That bug was fixed in 3.8.1. 2. Your program calls Gtk::Widget