Hi,

On Sat, 2007-09-22 at 17:50 +0200, Thomas Vander Stichele wrote:
> I was trying to figure out why Elisa cannot open my folder of albums,
> since it runs out of file descriptors.
> 
> It seems that all pigment images in the poblenou theme are being set
> with set_image_from_fd

True.

> The pigment documentation does not mention at all what happens to the
> open fd once it's done loading, and who's responsible for freeing it.
> 
> Loic, any idea who is ? I think the documentation should state the
> expected behaviour.

The file descriptor is closed by Pigment at the end of the loading. It's
now correctly stated in the documentation.

> If it is not up to pigment, but the caller, than the poblenou theme
> should be fixed to not leak fd's.
> 
> If it's up to pigment, I'm guessing it's not doing that atm.

Pigment now integrates a unit test checking that the file descriptor
given to pgm_image_set_from_fd is correctly closed at the end of the
loading. The unit test successes, you can see the patch there:

https://code.fluendo.com/pigment/trac/changeset/708

Looking at /proc/<pid>/fd while Elisa's running and testing the
different parts, I can say that on my system and with the set of
activated plugins, I can't see such a big leak. I've also noticed that
some files appear different time in the list of file descriptors,
including the elisa database and the FSpot one.

I've created a ticket in Elisa dedicated to that problem, can you please
attach the content of /proc/<pid>/fd so that we can see the type of the
file descriptors that are not closed, and localize the problem in Elisa.
Here is the link to the ticket:

https://code.fluendo.com/elisa/trac/ticket/638

Regards,
-- 
Loïc Molinari <[EMAIL PROTECTED]>

Reply via email to