{ "id": "133951", "key": "TIMOB-17580", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-07-31T08:49:16.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "SDCard", "TCSupport", "android" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:56.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. Problem Description \r\nIn my app we used icons and images. All the file size less than 20Kb. All this files are Download from server and store to SDCard. When we getting file from SDCard HEAP memory was increased and some time app will be EXIT. we put the same file inside the RESOURCE folder after we tried Heap Memory was not increased and app was stabled. Please refer the screenshot. \r\n\r\nHello, We have tested the issue with the following code below and we have observed the same problem.\r\n\r\nh5. TESTING ENVIRONMENT\r\n\r\nCLI version 3.3.0, \r\nTitanium SDK version 3.3.0.GA\r\nAndroid Device\r\n\r\n\r\nh4. STEP TO TEST\r\n\r\n- Create a new Project\r\n- Copy the Code above to the project \"app.js\" file\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor : 'white',\r\n top : 0,\r\n left : 0,\r\n width : '100%',\r\n height : '100%',\r\n title: \"Base Window\",\r\n layout:'vertical'\r\n});\r\n \r\nvar receiptDir=Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory,'TempFile');\r\nif (! receiptDir.exists()) {\r\n receiptDir.createDirectory();\r\n}\r\nvar receiptFile = Titanium.Filesystem.getFile(receiptDir.resolve(),'Untitled.rtf');\r\n \r\nvar read = Ti.UI.createButton({\r\n title : 'Read From File',\r\n});\r\n \r\nread.addEventListener('click', function() {\r\n alert(receiptFile.read().text);\r\n});\r\n \r\nwin.add(read);\r\n \r\nwin.open();\r\n{code}\r\n- Substitute the file name \"Untitled.rtf\" with the file's name that you want to read from SDCard, in your \"app.js\" file. (Untitled.rtf is here attached)\r\n- Run the app\r\n- Click \"Read From File\" to read your file, which will show in alert.\r\n\r\nh4. Actual results\r\nThe console shows {code}[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 10.670MB for 1536080-byte allocation {code} which indicates that the heap memory has raised.\r\n\r\n\r\nh4. Extra information\r\ntiapp.xml\r\n{code}41943040\r\n41943040\r\n17\r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n\r\n", "attachment": [ { "id": "50146", "filename": "Screen Shot 2014-07-31 at 4.09.35 pm.png", "author": { "name": "rksattanathan@gmail.com", "key": "rksattanathan@gmail.com", "displayName": "Sattanathan", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2014-07-31T08:49:16.000+0000", "size": 101058, "mimeType": "image/png" }, { "id": "50508", "filename": "Untitled.rtf", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2014-08-16T04:48:56.000+0000", "size": 398, "mimeType": "text/rtf" } ], "flagged": false, "summary": "Android : Memory was Increased Reading file from SDCard", "creator": { "name": "rksattanathan@gmail.com", "key": "rksattanathan@gmail.com", "displayName": "Sattanathan", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "rksattanathan@gmail.com", "key": "rksattanathan@gmail.com", "displayName": "Sattanathan", "active": true, "timeZone": "Asia/Shanghai" }, "environment": "CLI version 3.3.0, \r\nTitanium SDK version 3.3.0.GA\r\nAndroid Device", "comment": { "comments": [ { "id": "316553", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello!\r\n\r\nPlease provide a testcase in the form of app.js with a sample image produced in the same way (size, colors, etc).\r\n\r\nBest Regards!", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-01T00:02:46.000+0000", "updated": "2014-08-01T00:02:46.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }