[patch] more xfdesktop stuff - help wanted

Brian J. Tarricone bjt23 at cornell.edu
Mon Feb 9 04:18:53 CET 2004


here's a new xfdesktop patch.  the only new feature here from the last 
patch is the ability to disable icons in the menus entirely (again see 
the sample menu.xml for instructions).

the main reason i'm putting this out is because i need some help.  
there's a nasty memleak i can't track down.  according to 
gnome-system-monitor, it's causing memory usage to inflate by over a 
megabyte every time the menus are regenerated (with icons).

i've been running xfdesktop through valgrind (--leak-check=yes 
--show-reachable=yes --logfile=valgrind-xfd -v --num-callers=50 
--leak-resolution=high), and the stack traces i get back from that do 
point to icon creation, but the memory allocations seem to be buried 
deeply in libxml2 and/or librsvg (obviously only when SVG icons are 
being loaded).  while i won't rule out an external bug, it just seems a 
bit unlikely to me that either of those two libraries could be leaking 
so much memory.

there also seems to be some possibly-related leaks in the Netk stuff in 
libxfcegui4, but that's not my major concern now.  i fixed a couple 
leaks in libxfce4util that are now in cvs (as per my previous email).

i've posted the new patch, along with my latest valgrind log file, on my 
webserver:
http://kelnos.homelinux.org/xfce4/xfdesktop-menu-icons-20040208-2.diff.gz
http://kelnos.homelinux.org/xfce4/xfdesktop-valgrind-20040208.gz
the valgrind log is rather huge with the leak resolution set so high.  
there are a lot of gdk_pixbuf-related calls in there, actually, but 
anything with a g_module_* call in the trace can be safely ignored.

note: this trace was made with a small modification to xfdesktop so it 
frees all data held for the menu right before it quits.  i did this so 
valgrind wouldn't mark that memory as still reachable, but i didn't 
include that modification in the patch.  if you want to use it, try this 
patch (apply it after the other one):
http://kelnos.homelinux.org/xfce4/xfdesktop-freemem-on-quit-20040208.diff

i'd really appreciate it if someone (or several someones) could take a 
look at this, as i'm certainly not going to commit something that is 
leaking so much memory.

just for the hell of it, i tossed up a new screenie too:
http://kelnos.homelinux.org/xfce4/xfdesktop-menu-icons-20040208-2.png
pictured is the new default menu with icons enabled.  everything below 
the "About XFce" icon is autogenerated.

thanks,
brian



More information about the Xfce4-dev mailing list