Too Many Files Open - Result Code -42 (Can't Load Any More Instruments)
2003-07-09 by Evan Evans
Ran into this problem today when I was loading a massive instrument with many keyzones and 32 groups. Got the error: "Too Many Files Open - Result Code -42" I searched the web endlessly and found this info on developer.apple.com: "Why do I get a (-42) too many files open error? The number of files allowed to be open by Mac OS X applications defaults to 256. You can raise this limit by calling setrlimit( RLIMIT_NOFILE, &rip ). Setrlimit() is a mach-o routine, so if your application is CFM, you may have to call through the CFM- >Mach-O glue. For more information about setrlimit() type "man setrlimit" into the Terminal." This information, I believe, is for the developer to use (Emagic) to control the maximum amount of open files (samples, audio files, etc.). So it's their resposibility to program it in. i tried executing the root user commands described above and got no where. I further found this document at developer.apple.com called: "Open File limits On Mac OS X": http://developer.apple.com/qa/qa2001/qa1005.html I hope this helps others understand a little about this problem should it occur to them. Does anyone know how to raise the open file limits manually, perhaps via NetInfo Manager? Thanks, Evan Evans