I keep getting this error on a call of a subroutine whose sole job is to open a text file and return it. The file definitely exists and is also true in the debugger.
Whenever I step into this one section of code for this one file, I get this error. Yes not any where else but this one.
Var rCardtis As TextInputStream
Var fa As FolderItem
If fa.Exists Then
rCardtis = TextInputStream.Open(fa)//Error 24 at this line
End If
When I ran Error 24 in Terminal this is what I got:
I agree. That is very confusing. I know that too many files is not possible since I keep only one file at a time open. Also the file is on the hard drive.
Too many files open is for the whole system, not just your app. If you look at that link I sent you, thereās a suggestion about temporarily increasing the limit to check.
Also the file is on the hard drive.
Right. Too many files open on any drive connected to your system.
On the CLI ulimit you are modifying the shell session limits. Your App gained its limits from the launcher, BEFORE. So I guess you will need to change your launcher limits, and relaunch your app.
To see your current limits run:
launchctl limit maxfiles
To change it to the max run:
sudo launchctl limit maxfiles 10240 10240
The second number is the soft limit, and can be bigger than the hard limit, but why would we want that?
So you are reporting an unreal problem of a random code from StackExchange? Ok. Come back when you have some real problem. But if you HAD something like that, the solutions are provided. And the best one probably would be an app redesign.
I see you are running some āoldā macOS, because āunlimitedā string is not allowed as response anymore and the ākeywordā equals to 10240 in this context, currently, for compatibility reasons.