! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Memory Leak while cycling wallpapers
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description ToZ editbugs 2017-05-05 02:05:55 CEST
Created attachment 7101 
Valgrind report

With xfdesktop built from git on Arch.

I have been noticing this problem for a while where the memory usage climbs with each successive background cycle when set to automatically cycle. There is no limit to the amount of memory that gets used and evenutally system memory is exhausted and the computer ceases to work properly. I just tested xfdesktop git on a second computer and verified this issue.

To test, select a backdrop directory and set it to automatically change the image every 1 minutes (to see the memory climb much easier) in random order.

Attached is a valdrind report.

When I first noticed this issue a while ago I did a git bisect and identified this commit: https://git.xfce.org/xfce/xfdesktop/commit/?id=c93238818dec7c1666102ef3e33e40240ccea317 as the offending commit. Note that I do not have an animated desktop enabled.
Comment 1 Git Bot editbugs 2017-06-10 03:13:57 CEST
Eric Koegel referenced this bugreport in commit ea95f4f8f5638c4e2beb2172efe284b21eb2d189

Revert "Use gdk's get static image for animation files"

https://git.xfce.org/xfce/xfdesktop/commit?id=ea95f4f8f5638c4e2beb2172efe284b21eb2d189
Comment 2 ToZ editbugs 2017-06-10 05:14:56 CEST
Thanks Eric. This seems to fix the runaway memory problem. It's much more stable now.

However, I ran into a problem compiling the code. Granted it's been a while since I compiled it, and I don't recall hitting this issue before, but I get (end part of make):

CCLD     xfdesktop
xfdesktop-main.o: In function `main':
main.c:(.text.startup+0x1e): undefined reference to `dbus_g_thread_init'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:647: xfdesktop] Error 1


Commenting out the problemmatic line in src/main.c makes the compilation work and there doesn't seem to be any adverse effects. Is this something left over from the GDBus migration that is no longer required?

I'm running Arch Linux with gtk 3.22, glib 2.52, dbus 1.10.
Comment 3 Olivier Duchateau 2017-06-10 19:14:16 CEST
(In reply to ToZ from comment #2)
> Thanks Eric. This seems to fix the runaway memory problem. It's much more
> stable now.
> 
> However, I ran into a problem compiling the code. Granted it's been a while
> since I compiled it, and I don't recall hitting this issue before, but I get
> (end part of make):
> 
> CCLD     xfdesktop
> xfdesktop-main.o: In function `main':
> main.c:(.text.startup+0x1e): undefined reference to `dbus_g_thread_init'
> collect2: error: ld returned 1 exit status
> make[3]: *** [Makefile:647: xfdesktop] Error 1
> 
> 
> Commenting out the problemmatic line in src/main.c makes the compilation
> work and there doesn't seem to be any adverse effects. Is this something
> left over from the GDBus migration that is no longer required?
> 
> I'm running Arch Linux with gtk 3.22, glib 2.52, dbus 1.10.


I use this workaround in src/Makefile.in, because libxfconf has been ported to gdbus and so dbus and dbus-glib are not "imported" by pkgconf libs.

@@ -407,7 +407,7 @@ THUNARX_VERSION = @THUNARX_VERSION@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XFCONF_CFLAGS = @XFCONF_CFLAGS@
-XFCONF_LIBS = @XFCONF_LIBS@
+XFCONF_LIBS = @XFCONF_LIBS@ -ldbus-glib-1 -ldbus-1
 XFCONF_REQUIRED_VERSION = @XFCONF_REQUIRED_VERSION@
 XFCONF_VERSION = @XFCONF_VERSION@
 XFDESKTOP_VERSION_SHORT = @XFDESKTOP_VERSION_SHORT@
Comment 4 Eric Koegel editbugs 2017-06-11 10:23:49 CEST
That should be fixed in https://git.xfce.org/xfce/xfdesktop/commit/?id=716b49b9a69f176e2f72923734fe11da1f0b4d02 Xfdesktop shouldn't need the dbus-glib stuff anymore. Thanks for pointing it out.

Bug #13555

Reported by:
ToZ
Reported on: 2017-05-05
Last modified on: 2017-06-11

People

Assignee:
Eric Koegel
CC List:
2 users

Version

Version:
Unspecified

Attachments

Valgrind report (46.96 KB, text/x-log)
2017-05-05 02:05 CEST , ToZ
no flags

Additional information