[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#717371: idesk: Workaround for memory usage issue (patch attached)



Package: idesk 
Version: 0.7.5-4.2

I got a stable memory usage with the attached patch.

Extensive tests are required, but things seems to work fine.

However, probably this could be considered just an interim solution,
because some bad warnings from Imlib2

***** Imlib2 Developer Warning ***** :
This program is calling the Imlib call:
imlib_free_image_and_decache();
With the parameter:
image
being NULL. Please fix your program.

Except for these warnings, the fix seems to works.

--- a/src/XImlib2Background.cpp	2005-11-10 21:08:55.000000000 -0200
+++ b/src/XImlib2Background.cpp	2013-07-20 11:14:43.000000000 -0300
@@ -311,6 +311,12 @@ void XImlib2Background::InitSpareRoot(Wi
 			xContainer->widthOfScreen(), xContainer->heightOfScreen(), 1);     
 	XDestroyWindow(xContainer->getDisplay(), tmp);
 	imlib_context_set_drawable(xContainer->getRootWindow());
+
+	// Just a temporary hack to fix anomalous memory consumption (AMC).
+	if (spareRoot) {
+		cout << "[idesk] Debug: AMC hack." << endl;
+		imlib_free_image_and_decache();
+	}
 }
 
 Window XImlib2Background::createWindow()

Reply to: