On 17/11/2015 09:07, Kjell Ahlstedt wrote:
You mentioned in an earlier post that the error you see is a double
deletion of some memory. [...] Therefore I ran the toolbar example
program in the gtkmm tutorial (which allocates some widgets on the
heap) with valgrind. It reported some lost (leaked) memory. That's
normal with programs that use glib and gtk+. No other memory
problems.And I checked with gdb that Atk::Implementor::~Implementor()
was called several times.
Hi Kjell - presumably you built with gcc, yes..?
I'm actually building with MSVC-8 but for the hell of it, I re-built
Gtkmm this morning - this time making sure that GTKMM_ATKMM_ENABLED was
definitely #defined. Believe it or not I see the same crash as
codekiddy! I used a very simple application:-
int main (int argc, char *argv[])
{
Gtk::Main app (&argc, &argv); // Calls 'gtk_init()'
Gtk::Window mainWnd;
mainWnd.set_title ("Whatever");
app.run (mainWnd);
return 0;
}
When I attempt to close the app's window it crashes in the d'tor for
Glib::Atk::Implementor. More specifically, it crashes at this code in
'glibmm/glib/glibmm/refptr.h':-
template <class T_CppObject> inline
RefPtr<T_CppObject>::~RefPtr()
{
if(pCppObject_)
pCppObject_->unreference(); // This could cause pCppObject to
be deleted.
// ^ ^ ^ CRASH HAPPENS HERE
}
and the above seems to get called during this 'destroy_()' call in
'gtkmm/gtk/gtkmm/window.cc':-
Window::~Window()
{
destroy_();
}
My guess would be that there is indeed some kind of double deletion
happening. I'll spend another hour or so on it and see if I can get any
further...
John
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list