Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2002 19:17:09 -0500 (EST)
From:      Andriy Gapon <agapon@usa.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/35288: ports/afterstep has resources leak
Message-ID:  <20020224191420.E8289-100000@localhost>

next in thread | raw e-mail | index | archive | help

>Number:         35288
>Category:       ports
>Synopsis:       ports/afterstep has resources leak
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 24 16:20:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andriy Gapon
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
>Environment:
System: FreeBSD edge.icyb.net 4.5-RELEASE FreeBSD 4.5-RELEASE #1: Thu Jan 31 13:29:05 EST 2002 avg@edge.icyb.net:/sys-devel/obj/sys-devel/src/sys/EDGE i386



>Description:
	each time a managed window is iconized a new icon window is created and
	the previous one is lost. This window leak is a serious bug itself, but
	it may result in even more serious consequences.
	Each decoration window created by afterstep for an application window
	has an associated context, which is in fact a pointer to an aftrstep
	window, ASWindow, object. For leaked icon windows context is never
	destroyed leading to potential access to memory region that is not
	a valid ASWindow, if application for which icon windows were created is
	terminated. The latter usually results in coredump, symptom
	of which was desribed in PR ports/34066

>How-To-Repeat:
	iconify/deiconify a window multiple times; using application based on
	XQueryTree on root window determine number of child-windows. it will be
	incremented after each iconification.
	Coredumps have a more probabilistic nature and usually happen if you
	have substantial number of leaked windows, their application is
	terminated and you havily use applications that create windows and then
	change their properties through configure requests, e.g. opening
	certain web-pages using netscape.
>Fix:


--- icons.c.patch begins here ---
--- afterstep/icons.c.orig      Wed Feb 13 18:54:47 2002
+++ afterstep/icons.c   Wed Feb 13 18:58:13 2002
@@ -778,11 +778,13 @@
            MoveResizePagerView(t);
        }
     }
-
-    if(tmp_win->flags & ICON_MOVED)
-      CreateIconWindow(tmp_win,tmp_win->icon_x_loc,tmp_win->icon_y_loc);
-    else
-      CreateIconWindow(tmp_win, def_x, def_y);
+
+    if(tmp_win->icon_pixmap_w == None)  {
+      if(tmp_win->flags & ICON_MOVED)
+        CreateIconWindow(tmp_win,tmp_win->icon_x_loc,tmp_win->icon_y_loc);
+      else
+        CreateIconWindow(tmp_win, def_x, def_y);
+    }

   AutoPlace(tmp_win);
   tmp_win->flags |= ICONIFIED;
--- icons.c.patch ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020224191420.E8289-100000>