Too Many Open Files - Build #947

Hello Corona Community,

I have been engineering mobile apps with corona for 1.5 years now and have never seen this error message before. Somehow it seems to be related to the number of files opened. I download images if this helps understand the problem.
Image and video hosting by TinyPic
[import]uid: 100738 topic_id: 32958 reply_id: 332958[/import]

Operating systems limit the number of open files you can have at a time. This number can be different for every OS and OS version. OS X a long time ago had a very small limit of something like 128. I don’t know what the limits are today on Mac or iOS. But it sounds like you are hitting that limit. Try closing some files or not opening as many at the same time.

You might be able to use Instruments or Dtrace to probe which files are open, but I haven’t done it myself.
[import]uid: 7563 topic_id: 32958 reply_id: 130953[/import]

Would I run into this issue on the actual device? Should I worry about my xml reader closing files? [import]uid: 100738 topic_id: 32958 reply_id: 130973[/import]

Operating systems limit the number of open files you can have at a time. This number can be different for every OS and OS version. OS X a long time ago had a very small limit of something like 128. I don’t know what the limits are today on Mac or iOS. But it sounds like you are hitting that limit. Try closing some files or not opening as many at the same time.

You might be able to use Instruments or Dtrace to probe which files are open, but I haven’t done it myself.
[import]uid: 7563 topic_id: 32958 reply_id: 130953[/import]

Would I run into this issue on the actual device? Should I worry about my xml reader closing files? [import]uid: 100738 topic_id: 32958 reply_id: 130973[/import]

Yes, you may have this issue on device.

Yes, look into closing files in your xml reader.
[import]uid: 7563 topic_id: 32958 reply_id: 131106[/import]

Yes, you may have this issue on device.

Yes, look into closing files in your xml reader.
[import]uid: 7563 topic_id: 32958 reply_id: 131106[/import]

the xml reader closes the files after it reads them, should i worry about display objects? such as retina images? I use mostly retina images. [import]uid: 100738 topic_id: 32958 reply_id: 131189[/import]

I think we close our files for display objects so I don’t think it should be an issue. But I could be wrong or there could be a bug. I recommend you start debugging and figure out what’s being opened and what’s staying open. Start commenting out lines that open files to see which things matter and which don’t. [import]uid: 7563 topic_id: 32958 reply_id: 131196[/import]

the xml reader closes the files after it reads them, should i worry about display objects? such as retina images? I use mostly retina images. [import]uid: 100738 topic_id: 32958 reply_id: 131189[/import]

I think we close our files for display objects so I don’t think it should be an issue. But I could be wrong or there could be a bug. I recommend you start debugging and figure out what’s being opened and what’s staying open. Start commenting out lines that open files to see which things matter and which don’t. [import]uid: 7563 topic_id: 32958 reply_id: 131196[/import]

Downloaded images were not being closed, found the problem! [import]uid: 100738 topic_id: 32958 reply_id: 131396[/import]

Downloaded images were not being closed, found the problem! [import]uid: 100738 topic_id: 32958 reply_id: 131396[/import]