[PD] Fwd: readanysf~ error

Mathieu Bouchard matju at artengine.ca
Wed Jun 23 03:00:31 CEST 2010

On Tue, 22 Jun 2010, Pierre Cage wrote:

> [in_file] Error: Cannot open /foo1.wav: Too many open files
> Could not open file /foo1.wav
> /foo2.wav
> [in_file] Error: Cannot open /foo2.wav: Too many open files
> Could not open file /foo2.wav

Btw if you want those things to be printed to the console instead, then 
[readanysf~] would have to be recompiled with :

   #define printf startpost

This should go above the first use of printf. Despite what the name says, 
startpost doesn't have to be finished by a post or endpost, it's just that 
if you use startpost, you don't have to remove the \n nor suffer from 
pointless « doubles interlignes » in the console.

> open: open: open: open:

This comes from a lack of sync between one way of reporting errors and 
another. It looks like it doesn't come from [readanysf~], but rather, from 
a component used by [readanysf~]. In any case, this is usually a bad 
practice, because it prevents the user of a component to be in control of 
what's going on. In this case, the user of the component is [readanysf~] 
itself (I'm not counting the separate cpp files as really separate here). 
But it routinely happens... I remember some particularly infuriating 
linux codecs that were not designed for anything else than the Terminal 
because they would only report problems to the Terminal. Well, that's the 
case with readanysf~, but if you can add the line I was talking about 
above, most of the problem will be gone.

However, I don't know what happens to the actual error messages that go 
with "open:". It's possible that they are already being printed in some 
other manner. (???)

So, do you ever get the message that says :

   "Still opening a file what to do?"

Because that looks like a self-avowed filehandle-leak and thread-leak bug 
(both at once).  If there is not this message anywhere, then it looks like 
there is another bug on top of that. But I don't really know enough to be 
able to help here.

It would actually help a lot, if August stepped in.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801

More information about the Pd-list mailing list