Hi Mathieu,
Le 22 juin 2010 à 22:30, Mathieu Bouchard a écrit :
On Tue, 22 Jun 2010, pierre cage wrote:
On my system (osx 10.6, Pd-Ext 0.42.5-RC2, hcs' readanysf intel binary), and no matter the format and the size of the files, 240 successive openings lead to: "Invalid file or unsupported codec. Current file is either invalid or an unsupported codec"
Looks like this error message is wrong and the correct message is the one reported by Pd, isn't it ?
I guess so.
Then Pd refuses to save and reports : "error: /Users/me/Documents/PD/stress.pd: Too many open files" I join a simple "stress patch" that tries to isolate the error.
I can't try the patch at this point, but can you try whether sending "pause" before re-sending "open" makes any difference, and whether sending "stop" before re-sending "open" makes any difference. this would be a useful hint to know, for people who want to try solving the problem.
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
On Tue, 22 Jun 2010, Pierre Cage wrote:
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Le 22 juin 2010 à 23:13, Mathieu Bouchard a écrit :
On Tue, 22 Jun 2010, Pierre Cage wrote:
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
Terminal showing first errors :
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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.aiff
Terminal when trying to save four times :
open: open: open: open:
Sorry for the typo, no aiff here !
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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
Début du message réexpédié :
De : Pierre Cage pierre.cage@gmail.com Date : 22 juin 2010 23:28:19 HAEC À : Mathieu Bouchard matju@artengine.ca Cc : pd-list PD-list@iem.at Objet : Rép : [PD] readanysf~ error
Le 22 juin 2010 à 23:13, Mathieu Bouchard a écrit :
On Tue, 22 Jun 2010, Pierre Cage wrote:
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
Terminal showing first errors :
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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.aiff
Terminal when trying to save four times :
open: open: open: open:
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
On Tue, 22 Jun 2010, Mathieu Bouchard wrote:
It would actually help a lot, if August stepped in.
sorry, didn't see his mail at first.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
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.
Thanks for looking into that. The message itself is does give the impression of a filehandle or thread-leak....however, I do believe I cover it all just a few lines down when I join the thread and close out the files.
It should be irrelevant to the current "Too many open files" bug report, but I have cleaned it up now so that it at least reads better.
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
It really shouldn't matter if you send "pause" or "stop" before "open".
I also tracked down the "Too many open files" error message. It DOES come from readanysf~, .....from the gmerlin_avdec library. It is a strerror message.
I'm trying to track down now if somewhere file handles are not being closed properly. I will probably need a few days to find out.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
Terminal showing first errors :
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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.aiff
ok, this helps.
more late -august.
Le 23 juin 2010 à 12:41, august a écrit :
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
It really shouldn't matter if you send "pause" or "stop" before "open".
I also tracked down the "Too many open files" error message. It DOES come from readanysf~, .....from the gmerlin_avdec library. It is a strerror message.
I'm trying to track down now if somewhere file handles are not being closed properly. I will probably need a few days to find out.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
Terminal showing first errors :
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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.aiff
ok, this helps.
I wish I could help more ... Thanks for Mathieu's hints and your close support.
P
On Wed, 23 Jun 2010, august wrote:
I've tried all (prior "pause", "stop" and straight "open") and haven't noticed any change.
It really shouldn't matter if you send "pause" or "stop" before "open".
I asked the question to verify that it really shouldn't matter.
I also tracked down the "Too many open files" error message. It DOES come from readanysf~, .....from the gmerlin_avdec library. It is a strerror message.
yes, but how is it printed ? looks like "open: " is printed one way, and "too many open files" is printed in a different manner. is there a way to sync them up so that "open: " appears in console (or doesn't appear at all) ?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
so, I tracked down this bug. File handles were being inadvertently left open.
I made a new version of readanysf~ with reworking of the code based on adjustments I had been making for other stuff I am working . It should provide for more stable and modular code. Seeking should also be non-blocking and smoother now.
Can I ask linux users to download and test it, please:
http://aug.ment.org/software/readanysf~0.40.tar.gz
Hans,
Could I ask you to make another mac bundle so that it can be tested
for the mac users. The makefile should check if you are on darwin
or not. The setup should be the same, I think and you can just type
"make"
-august.
I also tracked down the "Too many open files" error message. It DOES come from readanysf~, .....from the gmerlin_avdec library. It is a strerror message.
I'm trying to track down now if somewhere file handles are not being closed properly. I will probably need a few days to find out.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
Terminal showing first errors :
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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.aiff
Great news, August ! I look forward to testing this brand new version. A pity I can't help with mac compiling ...
Pierre
Le 3 juil. 2010 à 12:00, august a écrit :
so, I tracked down this bug. File handles were being inadvertently left open.
I made a new version of readanysf~ with reworking of the code based on adjustments I had been making for other stuff I am working . It should provide for more stable and modular code. Seeking should also be non-blocking and smoother now.
Can I ask linux users to download and test it, please:
http://aug.ment.org/software/readanysf~0.40.tar.gz
Hans,
Could I ask you to make another mac bundle so that it can be tested for the mac users. The makefile should check if you are on darwin or not. The setup should be the same, I think and you can just type "make"
-august.
I also tracked down the "Too many open files" error message. It DOES come from readanysf~, .....from the gmerlin_avdec library. It is a strerror message.
I'm trying to track down now if somewhere file handles are not being closed properly. I will probably need a few days to find out.
Do you get any messages in the Terminal, when you start Pd from the Terminal ?
(the "open" command of the Terminal doesn't count, as it only asks the Finder to open a file.)
Terminal showing first errors :
/foo1.wav [demuxer] Info: Detected Microsoft WAV format opened /foo1.wav /foo2.wav [demuxer] Info: Detected Microsoft WAV format opened /foo2.wav /foo1.wav [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.aiff
Hi August
On Sat, 2010-07-03 at 12:00 +0200, august wrote:
so, I tracked down this bug. File handles were being inadvertently left open.
I made a new version of readanysf~ with reworking of the code based on adjustments I had been making for other stuff I am working . It should provide for more stable and modular code. Seeking should also be non-blocking and smoother now.
Can I ask linux users to download and test it, please:
make gives me:
g++ -c -o objs/ReadMedia.o src/ReadMedia.cpp -I./ -I/usr/include -I/usr/include/gavl -I/usr/include/gmerlin -I/usr/include -Wall src/ReadMedia.cpp: In constructor ‘ReadMedia::ReadMedia()’: src/ReadMedia.cpp:42: error: ‘GAVL_INTERLACE_UNKNOWN’ was not declared in this scope make: *** [objs/ReadMedia.o] Error 1
By commenting out line 42 of src/ReadMedia.cpp:
m_video_format.interlace_mode=GAVL_INTERLACE_UNKNOWN;
it compiles fine. Is that GAVL_INTERLACE_UNKOWN thing needed at all for the audio-oriented readanysf~? Should I be worried when commenting it out?
Cheers and thanks for the fixes Roman
so, I tracked down this bug. File handles were being inadvertently left open.
I made a new version of readanysf~ with reworking of the code based on adjustments I had been making for other stuff I am working . It should provide for more stable and modular code. Seeking should also be non-blocking and smoother now.
Can I ask linux users to download and test it, please:
make gives me:
g++ -c -o objs/ReadMedia.o src/ReadMedia.cpp -I./ -I/usr/include -I/usr/include/gavl -I/usr/include/gmerlin -I/usr/include -Wall src/ReadMedia.cpp: In constructor ‘ReadMedia::ReadMedia()’: src/ReadMedia.cpp:42: error: ‘GAVL_INTERLACE_UNKNOWN’ was not declared in this scope make: *** [objs/ReadMedia.o] Error 1
By commenting out line 42 of src/ReadMedia.cpp:
m_video_format.interlace_mode=GAVL_INTERLACE_UNKNOWN;
it compiles fine. Is that GAVL_INTERLACE_UNKOWN thing needed at all for the audio-oriented readanysf~? Should I be worried when commenting it out?
Cheers and thanks for the fixes Roman
no, it is not needed by readanysf~ and can be safely commented out or just changed to:
m_video_format.interlace_mode=GAVL_INTERLACE_NONE;
-august.