Guys,
I don't know if this is the issue but here is some info:
- if the memory leaks are severe it probably means we are leaking pixmaps
somewhere (it's the only thing that uses that much space).
- we had issues with severe memory leaks in citydlg.c when we did the
initial GTK+ 2.x client. I found out they were caused by the GtkImage
widgets back then (namely the units and possibly also the improvements
icons). that's why I eventually wrote the GtkPixcomm widget class (similar
to the one present in the Xaw client) to solve the memory leak and
performance issues back then. that supposedly solved the leaks.
- the production icons (added later) still used the standard GTK+ library
widgets (we never made our own specific list widget for this). so those
should use a lot of of memory. the fact is we shouldn't allocate any
pixmaps or pixbufs. We should just use the sprites data and redraw things
as necessary to avoid memory allocations.
- back then the easiest way to reproduce leaks was to repeatedly open and
close the city dialog.
- i also had issues with using Valgrind back then to debug the memory
leaks. but had some success with a leak detector tool that back then was
used developed by the GNOME developers (MemProf).

You guys should probably ask the GNOME or GTK+ developers what they
currently use to profile leak detection as they should have experience with
this. Valgrind should work but it's probably a configuration issue. See:
https://wiki.gnome.org/Valgrind

It hope this helps. I doubt there is a bug in X11 (it is usually pretty
well tested). I would not discount a bug in GTK+. But it is quite likely
the bug is in our application proper.

Regards,
-Vasco Costa
original GTK+/GTK+2.0 client port author.


On Thu, May 18, 2017 at 11:11 PM, David Fernandez <
no-reply.invalid-addr...@gna.org> wrote:

> Follow-up Comment #28, bug #21851 (project freeciv):
>
> I stopped playing freeciv for some time due to this issue, but I have no
> longer noticed this problem in my upgraded linux version:
> Kubuntu 15.10
> KDE Plasma 5.4.2
> gtk+ 2.24.28
> glib 2.46.2
>


-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to