got it! (Re: Kicker memory leaks)

Josef Weidendorfer Josef.Weidendorfer at gmx.de
Wed May 8 16:54:54 BST 2002


Hi all,

I think I found the reason for one Kicker memory leak (thanks to
Shane Wright).
Patch attached.
- It makes KDirWatch a direct member in PanelBrowserMenu. Somehow the
  instances were not deleted when clearing the menu (in reinitilize),
  leading to many KDirWatch instances. This should do it.
- The menu was reinitialized way to many times, as a dirty signal also
  can mean a file change inside the watched directory. This is now
  checked in reinitializeIfNeeded.
Can somebody check and apply to BRANCH and HEAD?
(Perhaps even for KDE 3.0.1)

Cheers,
Josef


On Wednesday 08 May 2002 17:12, you wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Ah, I'd been flying around the source trying to find the code for the
> button but handt found it yet. (stupidly hadn't grepped for KDirWatch
> though.. doh!).
>
> I guess you've seen on kde-devel that 3.0.1 hasn't been tagged yet - still
> time :))  If you want me to help or test or anything let me know :))
>
> Regards
>
> Shane
>
> On Wednesday 08 May 2002 4:03 pm, Josef Weidendorfer wrote:
> > Hi Shane,
> >
> > you are really fast!!!
> > I already suspected this as I grepped for KDirWatch in kicker sources...
> >
> > The class PanelBrowserMenu (kdebase/kicker/ui/browser_mnu.h/cpp)
> > in Kicker does something very wrong with KDirWatch usage:
> > Every time a file in your home is changed, the quickbrowser menu
> > is regenerated, and it seems that old KDirWatch's aren't deleted.
> >
> > The problem arised with some change in KDirWatch signals after the last
> > KDE3-RC I think, so it wasn't there in the RCs :-(
> > I will try to make a patch to get it into KDE 3.0.1...
> >
> > Thanks,
> > Josef
> >
> > PS: Perhaps I can come up with a patch later for you...
> >
> > On Wednesday 08 May 2002 16:49, you wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hi Josef!
> > >
> > > Found it - I had a 'Quick Browser' special button on one of my panels.
> > > Its definately that one where the trouble starts!
> > >
> > > I'll have a look through the code as well - I'm after learning more
> > > about all this.
> > >
> > > Thanks :))
> > >
> > > Shane
> > >
> > > On Wednesday 08 May 2002 3:28 pm, Josef Weidendorfer wrote:
> > > > Hi Shane,
> > > >
> > > > interesting...
> > > > There must be something wrong in kicker, most likely an applet.
> > > > The strange things are
> > > > - Why are there so many KDirWatch instances?
> > > > Your log starts with KDirWatch-2668 and ends with KDirWatch-2822.
> > > > This IS a memory leak, as the instances don't seem to be freed.
> > > > Do you know the time needed for logging these entries?
> > > > - Why does the change of some dotfile in your home start new watches
> > > > for every file in your home? As you can see, every file in your
> > > > home is watched already 91 times at the end of the log!!
> > > >
> > > > Can you switch off your applets and see if these kind of log entries
> > > > still are there? If not, it would be interesting to know the applet
> > > > leading to this behaviour. It's hard for me to grep the whole KDE
> > > > CVS for KDirWatch uses, as kicker applets are spreaded...
> > > >
> > > > Let me know if you find the black one of your applets (or if its
> > > > kicker itself!). This way, I hopefully could fix the applet.
> > > >
> > > > Best luck,
> > > > Josef
> > > >
> > > > On Wednesday 08 May 2002 15:32, you wrote:
> > > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > > Hash: SHA1
> > > > >
> > > > > Hi Josef
> > > > >
> > > > > I've been running kicker today and catching the output - it doesn't
> > > > > look like its doing anything too interesting - but it just leaks
> > > > > clients.
> > > > >
> > > > > This is highly related to disk activity - copying a couple of
> > > > > 100Mb+ files is pretty much guaranteed to knock it out completely.
> > > > >
> > > > > I dunno if the info attached will help you know whats going on -
> > > > > let me know if there's anything else I can provide.  I'm running
> > > > > KDE_3_0_BRANCH from CVS a week or so ago; I've no problem testing
> > > > > patches or anything if it helps.
> > > > >
> > > > > Regards
> > > > >
> > > > > - --
> > > > > Shane
> > > > >
> > > > >
> > > > > -----BEGIN PGP SIGNATURE-----
> > > > > Version: GnuPG v1.0.6 (GNU/Linux)
> > > > > Comment: For info see http://www.gnupg.org
> > > > >
> > > > > iD8DBQE82Sjy5DXg6dCMBrQRAiWuAJ9goZD0FuG9ZF3xt73pdgxu5gL/TACePv9b
> > > > > pUSZxiBJRVFOIFhKpK5N0CQ=
> > > > > =0UcT
> > > > > -----END PGP SIGNATURE-----
> > >
> > > - --
> > > Shane
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.0.6 (GNU/Linux)
> > > Comment: For info see http://www.gnupg.org
> > >
> > > iD8DBQE82Tru5DXg6dCMBrQRAiwuAJ9MR1y5Sp94BQb0vb3o5fE367xYhwCgoEy0
> > > U87Mo61g24UPfE7cyEqM8+w=
> > > =vuU5
> > > -----END PGP SIGNATURE-----
>
> - --
> Shane
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE82UB05DXg6dCMBrQRAtiJAJ4/0zVQ+QQMcUl1Aw6SRiZRox2euQCg2X5a
> RQtw2DJEypX6vym3yz8D5lc=
> =d0ZW
> -----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 2266 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020508/bca71592/attachment.diff>


More information about the kde-core-devel mailing list