From barner@in.tum.de  Sun Mar 21 11:32:28 2004
Return-Path: <barner@in.tum.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 94DF116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Mar 2004 11:32:28 -0800 (PST)
Received: from tuminfo2.informatik.tu-muenchen.de (tuminfo2.informatik.tu-muenchen.de [131.159.0.81])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9155543D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Mar 2004 11:32:27 -0800 (PST)
	(envelope-from barner@in.tum.de)
Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000)
	id E653647AA; Sun, 21 Mar 2004 20:32:39 +0100 (CET)
Message-Id: <20040321193239.E653647AA@zi025.glhnet.mhn.de>
Date: Sun, 21 Mar 2004 20:32:39 +0100 (CET)
From: Simon Barner <barner@in.tum.de>
Reply-To: Simon Barner <barner@in.tum.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: roddie@krweb.net
Subject: audio/easytag: Fix memory leak
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         64545
>Category:       ports
>Synopsis:       audio/easytag: Fix memory leak
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    petef
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 21 11:40:12 PST 2004
>Closed-Date:    Mon Jun 14 21:59:50 GMT 2004
>Last-Modified:  Mon Jun 14 21:59:50 GMT 2004
>Originator:     Simon Barner
>Release:        FreeBSD 4.9 i386
>Organization:
>Environment:
System: FreeBSD zi025.glhnet.mhn.de 4.9-STABLE FreeBSD 4.9-STABLE #0: Tue Feb 10 01:57:14 CET 2004     simon@zi025.glhnet.mhn.de:/usr/src/sys/compile/KISTE  i386

>Description:

Easytag leaks memory in the file list GTK control. The attached patch
from the author addresses this problem, but there is still _another_
memory leak around. I have informed the author about that, and I will
report back as soon as I hear from him (he seems to be very responsive).

>How-To-Repeat:

(This description is for the remaining bug, but it should be good enough
to make the problem clear)

- Make sure the "Tag and File Name scan" Window is open, and that
  "Fill Tag" is selected.
- Choose an mp3 folder and enter a regular expression that does _not_
  match the files in that folder, and that has a place holder after the
  mismatched separator (see below for an example).
- Move the selection in the mp3 list up and down => the memory usage
  increases continuously.

>Fix:

(There is still one more fix to come!)

--- patch-src_browser_c begins here ---
--- src/browser.c.orig	Thu Feb 12 00:14:57 2004
+++ src/browser.c	Sun Mar 21 18:22:21 2004
@@ -918,6 +918,7 @@
             style->base[GTK_STATE_NORMAL] = LIGHT_BLUE;
     }
     gtk_clist_set_row_style(GTK_CLIST(BrowserList),row,style);
+    gtk_style_unref(style);
 }
 
 
--- patch-src_browser_c ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->vs 
Responsible-Changed-By: vs 
Responsible-Changed-When: Mon Mar 22 10:03:08 PST 2004 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64545 
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Wed Mar 24 01:28:39 PST 2004 
State-Changed-Why:  
Asked maintainer for approval. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64545 

From: Volker Stolz <vs@freebsd.org>
To: roddie@krweb.net, freebsd-gnats-submit@freebsd.org,
	barner@in.tum.de
Cc:  
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Wed, 24 Mar 2004 10:27:40 +0100

 Dear maintainer of the FreeBSD-port audio/easytag, could please review the 
 proposed patch?
 Please reply to GNATS if it is acceptable and should be committed.
 
 Regards,
    Volker

From: Simon Barner <barner@in.tum.de>
To: freebsd-gnats-submit@FreeBSD.org
Cc: roddie@krweb.ne, vs@FreeBSD.org
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Wed, 24 Mar 2004 10:47:32 +0100

 Hi,
 
 here is an updated version of the patch (the fix for the second memory
 leak is also by the author of EasyTAG).
 
 Please note there there is at least _yet annother_ one present:
 
 
 You can reproduce it as follows:
 
 Open the Scan windows (SHIFT+C) and enter the following scan string:
 "# %i" (of course assuming the the files in your present directory do
 not start with a '#').
 
 You will need quite a lot of files in the song list, say 200, select the
 first one and move the cursor up and down patiently...
 
 => You can observe (e.g. in `top') how the memory usage grows
 continously.
 
 Regards,
  Simon
 
 diff -ruN easytag.orig/Makefile easytag/Makefile
 --- easytag.orig/Makefile	Tue Feb 10 05:44:22 2004
 +++ easytag/Makefile	Mon Mar 22 20:01:37 2004
 @@ -8,7 +8,7 @@
  
  PORTNAME=	easytag
  PORTVERSION=	0.30d
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	audio
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	${PORTNAME}
 diff -ruN easytag.orig/files/patch-src_browser.c easytag/files/patch-src_browser.c
 --- easytag.orig/files/patch-src_browser.c	Thu Jan  1 01:00:00 1970
 +++ easytag/files/patch-src_browser.c	Sun Mar 21 19:55:03 2004
 @@ -0,0 +1,10 @@
 +--- src/browser.c.orig	Thu Feb 12 00:14:57 2004
 ++++ src/browser.c	Sun Mar 21 18:22:21 2004
 +@@ -918,6 +918,7 @@
 +             style->base[GTK_STATE_NORMAL] = LIGHT_BLUE;
 +     }
 +     gtk_clist_set_row_style(GTK_CLIST(BrowserList),row,style);
 ++    gtk_style_unref(style);
 + }
 + 
 + 
 diff -ruN easytag.orig/files/patch-src_scan.c easytag/files/patch-src_scan.c
 --- easytag.orig/files/patch-src_scan.c	Thu Jan  1 01:00:00 1970
 +++ easytag/files/patch-src_scan.c	Mon Mar 22 19:59:55 2004
 @@ -0,0 +1,13 @@
 +--- src/scan.c.orig	Thu Feb 12 00:14:51 2004
 ++++ src/scan.c	Mon Mar 22 19:23:06 2004
 +@@ -528,7 +528,9 @@
 +         if (!fill_tag_list->next) break;
 +         fill_tag_list = fill_tag_list->next;
 +         
 +-        preview_text = g_strconcat(preview_text,"  ||  ",NULL);
 ++        tmp_preview_text = preview_text;
 ++        preview_text = g_strconcat(tmp_preview_text,"  ||  ",NULL);
 ++        g_free(tmp_preview_text);
 +     }
 +     Scan_Free_File_Fill_Tag_List(fill_tag_list);
 + 

From: Roddie Hasan <roddie@krweb.net>
To: Volker Stolz <vs@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org, barner@in.tum.de,
	petef@freebsd.org
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Wed, 24 Mar 2004 06:48:40 -0600 (CST)

 Volker and Simon,
 
 > Dear maintainer of the FreeBSD-port audio/easytag, could please review the
 > proposed patch?
 
 The day I got Simon's patch, I noticed that the author released 0.30.1
 (Developing version).  My plan was this weekend to confirm that the patch
 was present in this new version and upgrade the port in that direction.
 
 Thoughts?
 
 Regards,
 Roddie

From: Simon Barner <barner@in.tum.de>
To: Roddie Hasan <roddie@krweb.net>
Cc: Volker Stolz <vs@freebsd.org>, freebsd-gnats-submit@freebsd.org
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Wed, 24 Mar 2004 15:09:37 +0100

 Hi,
 
 > The day I got Simon's patch, I noticed that the author released 0.30.1
 > (Developing version).  My plan was this weekend to confirm that the patch
 > was present in this new version and upgrade the port in that direction.
 
 I admit I am really impatient, but my mp3 collection _really_ needs some
 pollishing before our party on Saturday ;-), so I updated the port on my
 own.
 
 Features of the patch:
  - update to 0.30.1
  - all memory leaks seem to be fixed
  - installation into ${X11BASE} and tow tiny path patches:
    => fix gnome menu item
  - a quick test did not show any regressions
 
 Cheers,
  Simon
 
 diff -ruN easytag.orig/Makefile easytag/Makefile
 --- easytag.orig/Makefile	Tue Feb 10 05:44:22 2004
 +++ easytag/Makefile	Wed Mar 24 14:47:32 2004
 @@ -7,19 +7,12 @@
  #
  
  PORTNAME=	easytag
 -PORTVERSION=	0.30d
 -PORTREVISION=	1
 +PORTVERSION=	0.30.1
  CATEGORIES=	audio
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	${PORTNAME}
  DISTNAME=	easytag-${PORTVERSION:S/d$//}
  
 -PATCHFILES=	patch_easytag_030_030a.diff patch_easytag_030a_030b.diff \
 -		patch_easytag_030b_030c.diff patch_easytag_030c_030d.diff
 -PATCH_SITES=	${MASTER_SITE_SOURCEFORGE}
 -PATCH_SITE_SUBDIR=	${PORTNAME}
 -PATCH_DIST_STRIP=	-p1
 -
  MAINTAINER=	roddie@krweb.net
  COMMENT=	Tag editor for MP3 and OGG files
  
 @@ -35,5 +28,6 @@
  CONFIGURE_ENV=	CONFIG_SHELL="${SH}" \
  		CPPFLAGS="-I${LOCALBASE}/include" \
  		LDFLAGS="-L${LOCALBASE}/lib"
 +USE_X_PREFIX=	yes
  
  .include <bsd.port.mk>
 diff -ruN easytag.orig/distinfo easytag/distinfo
 --- easytag.orig/distinfo	Tue Feb 10 05:44:22 2004
 +++ easytag/distinfo	Wed Mar 24 14:04:55 2004
 @@ -1,5 +1,2 @@
 -MD5 (easytag-0.30.tar.bz2) = 9f0dfde219c0422676f21afc49cc44bf
 -MD5 (patch_easytag_030_030a.diff) = 210c0e49ad524181420a481b214a5917
 -MD5 (patch_easytag_030a_030b.diff) = d38d94d319471c8b051f76df71de66e9
 -MD5 (patch_easytag_030b_030c.diff) = f48e07056ebd5d4b7b960d8f787c4f12
 -MD5 (patch_easytag_030c_030d.diff) = f6219b66a073743429e8385af8bb56ac
 +MD5 (easytag-0.30.1.tar.bz2) = d79fbdfd480246b021107c5ee5d7370f
 +SIZE (easytag-0.30.1.tar.bz2) = 1050633
 diff -ruN easytag.orig/files/patch-Makefile.in easytag/files/patch-Makefile.in
 --- easytag.orig/files/patch-Makefile.in	Tue Feb 10 05:44:22 2004
 +++ easytag/files/patch-Makefile.in	Wed Mar 24 14:31:45 2004
 @@ -1,10 +1,11 @@
 ---- Makefile.orig	Sun Feb  8 13:00:52 2004
 -+++ Makefile.in	Sun Feb  8 13:00:58 2004
 -@@ -518,7 +518,6 @@
 - 	uninstall-info-am uninstall-info-recursive uninstall-recursive \
 - 	uninstall-textDATA
 +--- Makefile.in.orig	Wed Mar 24 14:29:34 2004
 ++++ Makefile.in	Wed Mar 24 14:29:53 2004
 +@@ -110,7 +110,7 @@
   
 --dnl gnome_menudir=$(shell gnome-config --datadir)/gnome/apps/Multimedia
 - # Tell versions [3.59,3.63) of GNU make to not export all variables.
 - # Otherwise a system limit (for SysV at least) may be exceeded.
 - .NOEXPORT:
 + SUBDIRS = src intl po pixmaps doc
 + 
 +-gnome_menudir = $(datadir)/applications
 ++gnome_menudir = $(datadir)/gnome/applications
 + gnome_menu_DATA = easytag.desktop
 + 
 + textdir = $(datadir)/$(PACKAGE)
 diff -ruN easytag.orig/files/patch-pixmaps::Makefile.in easytag/files/patch-pixmaps::Makefile.in
 --- easytag.orig/files/patch-pixmaps::Makefile.in	Thu Jan  1 01:00:00 1970
 +++ easytag/files/patch-pixmaps::Makefile.in	Wed Mar 24 14:31:45 2004
 @@ -0,0 +1,11 @@
 +--- pixmaps/Makefile.in.orig	Wed Mar 24 14:30:08 2004
 ++++ pixmaps/Makefile.in	Wed Mar 24 14:30:58 2004
 +@@ -162,7 +162,7 @@
 + pixmapdir = $(datadir)/$(PACKAGE)
 + pixmap_DATA = EasyTAG_logo.xpm
 + 
 +-icondir = $(datadir)/pixmaps
 ++icondir = $(datadir)/gnome/pixmaps
 + icon_DATA = EasyTAG.xpm
 + 
 + EXTRA_DIST = $(BITMAPS) $(pixmap_DATA) $(icon_DATA)
 diff -ruN easytag.orig/pkg-plist easytag/pkg-plist
 --- easytag.orig/pkg-plist	Tue Feb 10 05:44:22 2004
 +++ easytag/pkg-plist	Wed Mar 24 14:38:59 2004
 @@ -1,7 +1,7 @@
  bin/easytag
  share/easytag/ChangeLog
  share/easytag/EasyTAG_logo.xpm
 -share/gnome/apps/Multimedia/easytag.desktop
 +share/gnome/applications/easytag.desktop
  share/locale/cs/LC_MESSAGES/easytag.mo
  share/locale/de/LC_MESSAGES/easytag.mo
  share/locale/es/LC_MESSAGES/easytag.mo
 @@ -15,8 +15,8 @@
  share/locale/ru/LC_MESSAGES/easytag.mo
  share/locale/sv/LC_MESSAGES/easytag.mo
  share/locale/uk/LC_MESSAGES/easytag.mo
 -share/pixmaps/EasyTAG.xpm
 -@unexec rmdir %D/share/gnome/apps/Multimedia 2>/dev/null || true
 -@unexec rmdir %D/share/gnome/apps 2>/dev/null || true
 +share/gnome/pixmaps/EasyTAG.xpm
 +@unexec rmdir %D/share/gnome/applications 2>/dev/null || true
 +@unexec rmdir %D/share/gnome/pixmaps 2>/dev/null || true
  @unexec rmdir %D/share/gnome 2>/dev/null || true
  @dirrm share/easytag

From: Roddie Hasan <roddie@krweb.net>
To: Simon Barner <barner@in.tum.de>
Cc: Volker Stolz <vs@freebsd.org>, freebsd-gnats-submit@freebsd.org
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Wed, 24 Mar 2004 16:39:05 -0600 (CST)

 Simon,
 
 > I admit I am really impatient, but my mp3 collection _really_ needs some
 > pollishing before our party on Saturday ;-), so I updated the port on my
 > own.
 
 It's all good - I'll have your changes tested here and on a 5.x system and
 submit them this evening or tomorrow.
 
 Thanks!
 
 Roddie

From: Simon Barner <barner@in.tum.de>
To: freebsd-gnats-submit@FreeBSD.org
Cc: roddie@krweb.net, vs@FreeBSD.org
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Fri, 26 Mar 2004 02:27:55 +0100

 Another update: Use `gnomeprefix' instead of patch files:
 
 diff -ruN easytag.orig/Makefile easytag/Makefile
 --- easytag.orig/Makefile	Tue Feb 10 05:44:22 2004
 +++ easytag/Makefile	Fri Mar 26 02:13:41 2004
 @@ -7,19 +7,12 @@
  #
  
  PORTNAME=	easytag
 -PORTVERSION=	0.30d
 -PORTREVISION=	1
 +PORTVERSION=	0.30.1
  CATEGORIES=	audio
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	${PORTNAME}
  DISTNAME=	easytag-${PORTVERSION:S/d$//}
  
 -PATCHFILES=	patch_easytag_030_030a.diff patch_easytag_030a_030b.diff \
 -		patch_easytag_030b_030c.diff patch_easytag_030c_030d.diff
 -PATCH_SITES=	${MASTER_SITE_SOURCEFORGE}
 -PATCH_SITE_SUBDIR=	${PORTNAME}
 -PATCH_DIST_STRIP=	-p1
 -
  MAINTAINER=	roddie@krweb.net
  COMMENT=	Tag editor for MP3 and OGG files
  
 @@ -30,10 +23,11 @@
  MAN1=		easytag.1
  
  USE_BZIP2=	yes
 -USE_GNOME=	gtk12
 +USE_GNOME=	gtk12 gnomeprefix
  GNU_CONFIGURE=	yes
  CONFIGURE_ENV=	CONFIG_SHELL="${SH}" \
  		CPPFLAGS="-I${LOCALBASE}/include" \
  		LDFLAGS="-L${LOCALBASE}/lib"
 +USE_X_PREFIX=	yes
  
  .include <bsd.port.mk>
 diff -ruN easytag.orig/distinfo easytag/distinfo
 --- easytag.orig/distinfo	Tue Feb 10 05:44:22 2004
 +++ easytag/distinfo	Wed Mar 24 14:04:55 2004
 @@ -1,5 +1,2 @@
 -MD5 (easytag-0.30.tar.bz2) = 9f0dfde219c0422676f21afc49cc44bf
 -MD5 (patch_easytag_030_030a.diff) = 210c0e49ad524181420a481b214a5917
 -MD5 (patch_easytag_030a_030b.diff) = d38d94d319471c8b051f76df71de66e9
 -MD5 (patch_easytag_030b_030c.diff) = f48e07056ebd5d4b7b960d8f787c4f12
 -MD5 (patch_easytag_030c_030d.diff) = f6219b66a073743429e8385af8bb56ac
 +MD5 (easytag-0.30.1.tar.bz2) = d79fbdfd480246b021107c5ee5d7370f
 +SIZE (easytag-0.30.1.tar.bz2) = 1050633
 diff -ruN easytag.orig/files/patch-Makefile.in easytag/files/patch-Makefile.in
 --- easytag.orig/files/patch-Makefile.in	Tue Feb 10 05:44:22 2004
 +++ easytag/files/patch-Makefile.in	Thu Jan  1 01:00:00 1970
 @@ -1,10 +0,0 @@
 ---- Makefile.orig	Sun Feb  8 13:00:52 2004
 -+++ Makefile.in	Sun Feb  8 13:00:58 2004
 -@@ -518,7 +518,6 @@
 - 	uninstall-info-am uninstall-info-recursive uninstall-recursive \
 - 	uninstall-textDATA
 - 
 --dnl gnome_menudir=$(shell gnome-config --datadir)/gnome/apps/Multimedia
 - # Tell versions [3.59,3.63) of GNU make to not export all variables.
 - # Otherwise a system limit (for SysV at least) may be exceeded.
 - .NOEXPORT:
 diff -ruN easytag.orig/pkg-plist easytag/pkg-plist
 --- easytag.orig/pkg-plist	Tue Feb 10 05:44:22 2004
 +++ easytag/pkg-plist	Wed Mar 24 14:38:59 2004
 @@ -1,7 +1,7 @@
  bin/easytag
  share/easytag/ChangeLog
  share/easytag/EasyTAG_logo.xpm
 -share/gnome/apps/Multimedia/easytag.desktop
 +share/gnome/applications/easytag.desktop
  share/locale/cs/LC_MESSAGES/easytag.mo
  share/locale/de/LC_MESSAGES/easytag.mo
  share/locale/es/LC_MESSAGES/easytag.mo
 @@ -15,8 +15,8 @@
  share/locale/ru/LC_MESSAGES/easytag.mo
  share/locale/sv/LC_MESSAGES/easytag.mo
  share/locale/uk/LC_MESSAGES/easytag.mo
 -share/pixmaps/EasyTAG.xpm
 -@unexec rmdir %D/share/gnome/apps/Multimedia 2>/dev/null || true
 -@unexec rmdir %D/share/gnome/apps 2>/dev/null || true
 +share/gnome/pixmaps/EasyTAG.xpm
 +@unexec rmdir %D/share/gnome/applications 2>/dev/null || true
 +@unexec rmdir %D/share/gnome/pixmaps 2>/dev/null || true
  @unexec rmdir %D/share/gnome 2>/dev/null || true
  @dirrm share/easytag
Responsible-Changed-From-To: vs->freebsd-ports-bugs 
Responsible-Changed-By: vs 
Responsible-Changed-When: Sat Mar 27 10:23:59 PST 2004 
Responsible-Changed-Why:  
Release this one: I'll be away for a week. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64545 
Responsible-Changed-From-To: freebsd-ports-bugs->petef 
Responsible-Changed-By: petef 
Responsible-Changed-When: Sun Mar 28 12:02:08 CST 2004 
Responsible-Changed-Why:  
I'll work with the submitter and maintainer on this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64545 

From: Roddie Hasan <roddie@krweb.net>
To: Simon Barner <barner@in.tum.de>
Cc: freebsd-gnats-submit@FreeBSD.org, vs@FreeBSD.org
Subject: Re: ports/64545: audio/easytag: Fix memory leak
Date: Sun, 28 Mar 2004 20:50:35 -0600 (CST)

 Simon et al,
 
 I was about to get an update to EasyTAG 0.30.2 committed, and discovered
 that from a pkg_version perspective, 0.30d is more recent than 0.30.2.
 Rather than make a guess and cheat the version, I've emailed the author to
 find out if he's got plans for a 30e.
 
 Once I get an answer, I'll submit the update again.
 
 Roddie
State-Changed-From-To: feedback->closed 
State-Changed-By: vs 
State-Changed-When: Mon Jun 14 21:57:36 GMT 2004 
State-Changed-Why:  
Upstream is at 0.31 now. Please submit updates in a new PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64545 
>Unformatted:
