From kde-commits Mon Jul 31 06:45:52 2000 From: Charles Date: Mon, 31 Jul 2000 06:45:52 +0000 To: kde-commits Subject: Re: kdemultimedia/noatun/noatun/library X-MARC-Message: https://marc.info/?l=kde-commits&m=96502733220019 On Mon, 24 Jul 2000, you wrote: > On Mon, Jul 24, 2000 at 08:02:56AM -0700, Charles wrote: > > On Sun, 23 Jul 2000, you wrote: > > > On Mon, 24 Jul 2000, CVS by charles wrote: > > > > > > > Oh, and KAction has a memory leak. No big problem there. > > > > > > Can you tell me which? > > Ok. Let me tell you a story: > > > > Here I am wondering why the program crashes on exit. > > It always seems to crash QWidget::destroyMapper() > > > > I'm not entirely sure what destroyMapper() does, but I can guess that it > > allocates the windows with Xlib or something. > > No, but it happens to iterate through all widgets that Qt still > knows about, and if one of them was "leaked" by a shared library that > has been unloaded, then crash. This is the crash I fixed in kwrite > recently, for instance. > > > That tells me that the KLibrary is still loaded and can't be unloaded, entirely. > More or less. > > And I eventually found it out which. > Which ? The playlist one :) > > > Then I remove every class that is allocated with new. > > > > It's the KActions! > > > > So, I delete the KAction's in it's parents destructor and.... what? It works > > now? Blasphemy! KAction has a parent! It should be destroyed with its > > parents! > > > > But it isn't. [sigh] This is why we use a beta. > > The problem is not exactly the kaction, but probably one of the widgets > it creates when being plugged, and that widget isn't destroyed > because the action isn't unplugged. That's the bug you should look > for: why the action isn't unplugged. > Reminder: for performance reasons, the KAction destructor doesn't > unplug the action. So.... if you remove a part from your GUI, > unplug its actions. KToolBar sucks. I have proof. It just sucks. Even KAction doesn't need to be there. Just buttons created with KToolBar. Argh. > > > see kdemultimedia/noatun/noatun/modules/splitplaylist/view.cpp > > Look at class View's constructor and destructor. > > > > And never make me go through that again. > ? Pain in the. err. derrier to figure this out. > > -- > David FAURE > david@mandrakesoft.com, faure@kde.org > http://home.clara.net/faure/, http://www.konqueror.org/ > KDE, Making The Future of Computing Available Today -- Charles - charles@kde.org "Flotte sko, vil du knulle?"