Let's see, I am trying to peer into my crystal ball at your invisible code, but I am not having much luck.

So if you are getting an error that indicates there are no resources available, this would seem to indicate that maybe you have opened too many files or other things that use a resource handle, but haven't closed or released those handles after you are done with them. Is every fopen() matched with an fclose() (or the equivalent if you are writing a pure Qt solution)? If a FILE pointer goes out of scope, it doesn't close the file in the process, the file (and the resource handle it uses) stay open until your program exits.