[PD] [soundfiler] - too many open files / bad file descriptor error (meaning?)

Alexandre Torres Porres porres at gmail.com
Fri Feb 8 18:59:56 CET 2019

Em sex, 8 de fev de 2019 às 13:55, Alexandre Torres Porres <porres at gmail.com>

>> https://github.com/porres/pd-else/blob/9b259f24569a13069c5842ec0f598e8fe96c8cbc/Classes/Source/dir.c#L75
>> the leak seems to be on this line.  you should keep the return value of
>> opendir and be sure to close it when no longer necessary.
Well, I'll take there must be a leak or something there, but I'm calling
this method (dir_open) in the patch. This object opens directories so we
query for filenames in it, and for that it depends on <dirent.h>. And the
thing is that if there are too many opened directories, crap happens. I've
tried everything already, but it seems to be an issue with the opendir()
function in dirent.h

See http://pubs.opengroup.org/onlinepubs/7908799/xsh/opendir.html where it
says "*applications will only be able to open up to a total of {OPEN_MAX}
files and directories*", that might be it. Also, the given errirs in that
page mention "descriptors" and how "Too many files are currently open in
the system".

Em sex, 8 de fev de 2019 às 07:58, Roman Haefeli <reduzent at gmail.com>

> Maybe you closed them, despite them not being fixed.

I may have closed yours because it was a duplicate issue, also
reported/discussed here https://github.com/porres/pd-else/issues/248 by

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190208/9569fda9/attachment-0001.html>

More information about the Pd-list mailing list