{ "id": "77520", "key": "TIMOB-4632", "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": [ { "id": "12084", "description": "", "name": "Sprint 2011-44", "archived": true, "released": true, "releaseDate": "2011-11-07" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2011-10-31T13:09:42.000+0000", "created": "2011-07-06T10:00:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "filesystem", "streams" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [ { "id": "11628", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "77558", "key": "TIMOB-4612", "fields": { "summary": "Android: Reading and writing large files cause ANR / Exceptions in Fastdev", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T17:23:45.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When trying to open a large file in order to copy it to another location, the app crashes, trying to allocate enough memory to copy the entire file into memory. This happens on the call to open the file, so a buffered read of a large file is not possible. For example:\r\n\r\nvar infile = Ti.Filesystem.getFile(\"app://myLargeFile.db\");\r\nvar instream = infile.open(Titanium.Stream.MODE_READ);\r\n\r\nIn this case, myLargeFile.db is a 13mb file, and causes the app to crash on the call to infile.open.\r\n", "attachment": [ { "id": "23960", "filename": "bigText.txt.zip", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-31T13:12:28.000+0000", "size": 347477, "mimeType": "application/zip" } ], "flagged": false, "summary": "Can't open a large file as a stream", "creator": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 1.7.0, 1.7.1", "comment": { "comments": [ { "id": "159121", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "I am not aware of any {{Ti.Filesystem.File.open()}} method. Please would you change your usecase code to use only the methods published in the [official APIDocs|http://developer.appcelerator.com/apidoc/mobile/latest]. Thank you", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T06:54:29.000+0000", "updated": "2011-07-09T06:54:29.000+0000" }, { "id": "159124", "author": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am using code posted on your official blog, here:\r\n\r\nTitanium Mobile Intro Series: Streams\r\nPublished on May 4, 2011 by Bill Dawson (Platform Engineer)\r\nhttp://developer.appcelerator.com/blog/2011/05/titanium-mobile-intro-series-streams.html\r\n\r\nI am using the exact sample code posted in this article under the FileStream Example.", "updateAuthor": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-09T07:52:14.000+0000", "updated": "2011-07-09T07:52:14.000+0000" }, { "id": "159125", "author": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Speaking of documentation...\r\nThe FileStream object is documented here:\r\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Filesystem.FileStream-object.html\r\n\r\nHowever, there are no open methods documented -- only close methods. The examples are incomplete and confusing, saying things like:\r\n\r\nvar inStream = // stream object could be socket, file, buffer or blob\r\n\r\nThis is an incomplete example. How do you open a file object as a stream? The documentation says it's possible, but does not say how.", "updateAuthor": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-09T08:09:41.000+0000", "updated": "2011-07-09T08:09:41.000+0000" }, { "id": "159140", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T15:52:47.000+0000", "updated": "2011-07-09T16:02:14.000+0000" }, { "id": "159286", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "There's also the undocumented \"Ti.Filesystem.openStream(Ti.Filesystem.MODE_READ, 'test.log')\" method to contend with.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-07-12T09:48:29.000+0000", "updated": "2011-07-12T09:48:29.000+0000" }, { "id": "159290", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mark, Paul, Dawson. Is this still occurring after TIMOB-4612?", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-12T10:25:06.000+0000", "updated": "2011-07-12T10:25:06.000+0000" }, { "id": "170938", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test Code: \"bigTexts.txt\" is uploaded to this ticket. It is 46mb.\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nvar infile = Ti.Filesystem.getFile(\"bigTexts.txt\");\r\nvar instream = infile.open(Titanium.Stream.MODE_READ);\r\nwin.open();\r\n{code}\r\n\r\nGit hash version:\r\n\r\ncommit e69cc8f31db0e3745f6bbdef2934be0cc9e1407e\r\nMerge: 9aea8e9 e4a5362\r\n", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-31T13:09:42.000+0000", "updated": "2011-10-31T13:09:42.000+0000" }, { "id": "416503", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as it has been over 5 years since the last update. Please open a new ticket if you have a problem.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T17:23:45.000+0000", "updated": "2017-03-31T17:23:45.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }