From 12f116576532fefcd2b698c6f2b1a4c27c18ce22 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 27 Oct 2016 23:36:20 +0200 Subject: [PATCH] Inv(#1020): add code to monitor clean-up by GTK I am still suspicious the cleanup mechanism for child widgets works as expected... But right now, we can't verify that, since on shutdown we get an assertion failure from ld.so "dl-close.c: 762: _dl_close: Assertion `map->l_init_called' failed!" Seems we're loading the GUI plugin not properly --- src/gui/panel/timeline-panel.cpp | 30 ++++++++++++++++++++++++++++++ src/gui/panel/timeline-panel.hpp | 4 ++++ 2 files changed, 34 insertions(+) diff --git a/src/gui/panel/timeline-panel.cpp b/src/gui/panel/timeline-panel.cpp index 7bbb91b1a..09f725ae8 100644 --- a/src/gui/panel/timeline-panel.cpp +++ b/src/gui/panel/timeline-panel.cpp @@ -127,6 +127,8 @@ namespace panel { namespace { _Fmt childID("Chld-%02d"); + + int instanceCnt = 0; } @@ -138,9 +140,37 @@ namespace panel { { signal_clicked().connect( mem_fun(*this, &ChildEx::onClicked)); + + ++instanceCnt; } + ////////////////////////////////////////////////////////////////////TICKET #1020 : verification code for instance management + ChildEx::~ChildEx() + { + --instanceCnt; + if (instanceCnt > 0) + cout << " 💀 still "<