[TIMOB-6054] Titanium.Filesystem.File.exists function crashes after being called for many times
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2011-11-10T14:39:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-45 |
Components | iOS |
Labels | n/a |
Reporter | Qing Gao |
Assignee | Reggie Seagraves |
Created | 2011-11-07T13:41:45.000+0000 |
Updated | 2017-03-03T22:50:52.000+0000 |
Description
Titanium.Filesystem.File.exists() function crashes after being repeatedly called. The crash log is attached. This bug has been fixed in 1.8.0.
Repro Steps
Run the following code snippet on the iPhone emulator and it will get crashed.
var dir, i;
for (i = 0; i <= 1000; i++) {
dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory, "myfolder");
if (!dir.exists()) {
dir.createDirectory();
}
}
alert("done");
Associated Helpdesk Ticket
http://appc.me/c/APP-647367Attachments
File | Date | Size |
---|---|---|
testFileSystem_2011-11-08-100821_qgaombp.crash | 2011-11-08T10:12:47.000+0000 | 37545 |
As mentioned in the helpdesk ticket, a fix for 1.7 would be greatly appreciated, as I can't drop support for iOS3 yet.
In case it helps, the crash my users are getting in the app looks a little different, but also seems to be triggered by an exists() call (if I comment out the call, no crash)
Unfortunately the fix for this issue was actually a fix in JavaScriptCore. As it requires a new JavaScriptCore, it is not possible for us to merge this fix into the 1_7_X branch. Upgrading to 1.8 is the only resolution for the issue.
Closing ticket.