GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-14T22:37:13.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 2.1.4, Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 |
Components | Android |
Labels | api, module_filesystem, qe-manualtest, qe-port, triage |
Reporter | Nikhil Sharma |
Assignee | Hieu Pham |
Created | 2012-10-10T19:10:31.000+0000 |
Updated | 2014-08-14T22:37:13.000+0000 |
Many calls to getFile with the application data directory causes the local reference table overflow error. It works fine on android 2.3.4 and 3.1, but on android 4.0.1 and 4.1 it stops after the 504 calls.
Repo Steps
1. Run the below code in your app.js
2. Open the DDMS and you can see that it stops at 504 call and gives the above error.
var win = Ti.UI.createWindow({
backgroundColor : "red"
})
for (var i = 0; i < 512; i++) {
Ti.API.info(i);
var dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, "test");
};
win.open();
Created [PR #3221](https://github.com/appcelerator/titanium_mobile/pull/3221) to resolve issue in master.
Need to backport to 2_1_X branch.
Created [PR #3230](https://github.com/appcelerator/titanium_mobile/pull/3230) to back port fix into 3.0 release.
I don't believe we have a 2.1.X backport PR yet. Could you please generate that?
2.1.X PR: https://github.com/appcelerator/titanium_mobile/pull/3316
Tested with 2.1.4.v20121030173408 on Droid 3 2.3.4