{ "id": "63071", "key": "TIMOB-2439", "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": "11228", "name": "Release 1.5.0 M03", "archived": true, "released": true, "releaseDate": "2010-11-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:06.000+0000", "created": "2011-04-15T03:19:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "filesystem", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T01:59:06.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": "{html}

Cf. Helpdesk\n57781.

\n

Failcase app.js:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar text = \"This is my text\";\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'test');\nif (file.exists()) { \n    file.deleteFile();\n}\nfile.write(text);\n// nullify and re-create to test\nfile = null;\nfile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'test');\nTi.API.info('file.exists(): ' + file.exists());\nvar blob = file.read();\nvar readText = blob.text;\nTi.API.info(readText);\n
\n

Before fix, that last info line will show null.

{html}", "attachment": [], "flagged": false, "summary": "Android: TiBlob.text sometimes returns null", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "128475", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [b690ce4941073cc1309ca9517d4465ff3da14b27])\n[#2439 state:fixed-in-qa] Relax restriction\n(which I added a while ago) concerning whether to read a blob as\nutf-8 text. Only avoid it if the mime type is known\nbinary. Set XHR->blob mimetype since it's known. Add unit test.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/b690ce494107...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:19:54.000+0000", "updated": "2011-04-15T03:19:54.000+0000" }, { "id": "128476", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Pass Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8)\ndrillbit test Android Sim 1.6/2.1

\n

android sim 1.6
\n\nhttps://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...

\n

android sim 2.1
\n\nhttps://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:55.000+0000", "updated": "2011-04-15T03:19:55.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }