Bug#871037: UH leaks
Control: tags -1 pending Control: block -1 by 872776 On Fri, 11 Aug 2017 22:17:49 +0200 Petter Reinholdtsen wrote: > Here is a tested quilt patch to be stored in > debian/patches/1000-icon-mem-leak.patch. > > I could not verify that all leaks are plugged, as the program is > still increasing in size while playing, and I do not know if this > is normal or not. But the code in question make sense and is from > upstream, so it should at least reduce the amount of memory used. :) > > I tested with the patch in place, and the game is working as it should. > I was not able to trigger the slowdown, but do not know if I played > long enough. :) Hi, thank you for the patch. I have prepared a stretch-pu and the issue will hopefully be resolved soon. Regards, Markus signature.asc Description: OpenPGP digital signature
Bug#871037: UH leaks
Here is a tested quilt patch to be stored in debian/patches/1000-icon-mem-leak.patch. I could not verify that all leaks are plugged, as the program is still increasing in size while playing, and I do not know if this is normal or not. But the code in question make sense and is from upstream, so it should at least reduce the amount of memory used. :) I tested with the patch in place, and the game is working as it should. I was not able to trigger the slowdown, but do not know if I played long enough. :) -- Happy hacking Petter Reinholdtsen Description: Fix small `get_res_icon_path()` widget leak `horizons.gui.util.get_res_icon_path()` does the same thing as as `horizons.gui.widgets.imagebuton`: aks fife to create an `Icon()` to see if it's a valid image path. But other than the `ImageButton`, `get_res_icon_path()` did forget to call `hide()` on that `Icon`. So the `Icon` stayed alive, even though unused. We now call `hide()` on that `Icon`. Origin: https://github.com/unknown-horizons/unknown-horizons/commit/25e933202e2db6083d0f163d978559c4ac24fb94 Author: MasterofJOKers Bug-Debian: https://bugs.debian.org/871037 diff --git a/horizons/gui/util.py b/horizons/gui/util.py index a7c13584b..2fb2796b3 100644 --- a/horizons/gui/util.py +++ b/horizons/gui/util.py @@ -125,7 +125,7 @@ def get_res_icon_path(res, size=32, greyscale=False, full_path=True): icon_path = icon_path + '{res:03d}.png'.format(res=res) try: - Icon(image=icon_path) + Icon(image=icon_path).hide() except fife.NotFound: # ImageManager: image not found, use placeholder or die if res == 'placeholder': raise Exception('Image not found: {icon_path}'.format(icon_path=icon_path))
Bug#871037: UH leaks
Control: clone -1 -2 Control: reassign -2 python-fife Control: retitle -2 python-fife: leak memory when looking for icons (affects unknown-horizons) [LinuxDonald] > ON UH side it should be this commit: > https://github.com/unknown-horizons/unknown-horizons/commit/25e933202e2db6083d0f163d978559c4ac24fb94 > and on fife engine side this one: > https://github.com/fifengine/fifengine/commit/2efebb3a0940e2570d2e7abeb54957dcb6f110ea Thank you. Those are small and to the point, and should be possible to get into Debian Stable. As the fix is in two packages, I clone this bug to the python-fife package. -- Happy hacking Petter Reinholdtsen
Bug#871037: UH leaks
ON UH side it should be this commit: https://github.com/unknown-horizons/unknown-horizons/commit/25e933202e2db6083d0f163d978559c4ac24fb94 and on fife engine side this one: https://github.com/fifengine/fifengine/commit/2efebb3a0940e2570d2e7abeb54957dcb6f110ea Am 07.08.2017 14:19 schrieb Markus Koschany: On 07/08/17 02:36, Thomas Kowaliczek wrote: Hello I'm the project leader of Unknown-horizons. The version 2017.1 have some memory leaks and the engine too. They are all fixed in the last stable versions. I would recommend to use 2017.2 from testing/unstable repo. Hello, thank you for following up on this bug report. We have already packaged the latest version of UH in unstable. The current problem is that we ship 2017.1 in Debian Stretch, the stable distribution of Debian, and updates should be minimal to comply with Debian's rules for stable updates. I'm not sure if we were allowed to backport 2017.2 to Stretch because there are other changes which makes it hard for our release team to review. Can you point me to the relevant commits or patches that fix those memory leaks? Then I might be able to backport them. If I understand you correctly, fife and maybe even fifechan are affected as well? Then we need to clone this bug report and address those issues in all packages. Regards, Markus
Bug#871037: UH leaks
On 07/08/17 02:36, Thomas Kowaliczek wrote: Hello I'm the project leader of Unknown-horizons. The version 2017.1 have some memory leaks and the engine too. They are all fixed in the last stable versions. I would recommend to use 2017.2 from testing/unstable repo. Hello, thank you for following up on this bug report. We have already packaged the latest version of UH in unstable. The current problem is that we ship 2017.1 in Debian Stretch, the stable distribution of Debian, and updates should be minimal to comply with Debian's rules for stable updates. I'm not sure if we were allowed to backport 2017.2 to Stretch because there are other changes which makes it hard for our release team to review. Can you point me to the relevant commits or patches that fix those memory leaks? Then I might be able to backport them. If I understand you correctly, fife and maybe even fifechan are affected as well? Then we need to clone this bug report and address those issues in all packages. Regards, Markus
Bug#871037: UH leaks
Hello I'm the project leader of Unknown-horizons. The version 2017.1 have some memory leaks and the engine too. They are all fixed in the last stable versions. I would recommend to use 2017.2 from testing/unstable repo. Greetings Thomas Kowaliczek