KisMediatorSingleTon and closing Krita

Adrian Page Adrian.Page at tesco.net
Thu Feb 26 13:35:16 CET 2004


On Thursday 26 February 2004 11:38 am, Boudewijn Rempt wrote:
> For some time now, I either cannot close Krita at all (the process keeps
> hanging), or I get a crash with a long backtrace (see below). Am I the only
> one to have these problems -- i.e., is it something local to my computer,
> or is it more widespread, and, more importantly, does anyone know what's
> going on?

I get exactly the same thing. It seems to be caused by KisTileMgr's destructor 
calling KisTileMediatorSingleton's detachAll() on itself while the 
KisTileMediatorSingleton is itself being destroyed. Something like this: 

- KisTileMediatorSingleton gets destroyed
- Its member map's destructor is called
- The map destroys itself, which destroys the lists it holds
- The lists destroy the KisTileMgrSP/int pairs they hold
- A KisTileMgrSP's reference count become 0 so it is destroyed
- The KisTileMgr's destructor is called, which calls 
KisTileMediatorSingleton's detachAll()
- detachAll iterates over items in the map and lists, which are in the process 
of being destroyed, so it goes bang!

I think that's right. There's probably a simple fix but I got a headache just 
from trying to figure out what was going on in the debugger... :)

Adrian



More information about the kimageshop mailing list