{ "id": "160438", "key": "TIMOB-23425", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-05-24T23:32:43.000+0000", "created": "2016-05-23T18:07:12.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.3.0" ], "versions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "issuelinks": [ { "id": "51789", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "154430", "key": "TIMOB-20257", "fields": { "summary": "Windows: Support Ti.Blob.imageAs* methods", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-30T15:26:18.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nWhen using the Ti.Blob.imageAs methods if they are given a blob that does not represent an image then the application will crash, based off the documentation and other platforms they should not crash but just return null [docs|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized]\r\n\r\n{code}\r\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'text.txt');\r\nfile.write('hi');\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'black'\r\n});\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'resized',\r\n\ttop: 10\r\n});\r\nbtn.addEventListener('click', function(){\r\n\tvar file2 = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'text.txt');\r\n\tvar text = file2.read();\r\n\tvar resized = text.imageAsResized(25, 25);;\r\n});\r\nvar btn2 = Ti.UI.createButton({\r\n\ttitle: 'cropped',\r\n\ttop: 75\r\n});\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\nh5.Steps to reproduce\r\n\r\n1. Using the code above build to a windows device or emulator\r\n\r\nh5.Actual result\r\n\r\nApplication will crash\r\n\r\nh5.Expected result\r\n\r\nApplication should not crash, methods should return null", "attachment": [], "flagged": false, "summary": "Windows: Ti.Blob.imageAs* methods crash the application when using a blob that does not represent an image", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Windows 10 Pro\r\nVisual Studio 2015 Community Update 2\r\nAppc Core: 5.3.0-46\r\nAppc NPM: 4.2.5-5\r\nTi SDK: 5.3.0.v20160523083840", "closedSprints": [ { "id": 631, "state": "closed", "name": "2016 Sprint 11 SDK", "startDate": "2016-05-21T00:06:10.029Z", "endDate": "2016-06-04T00:06:00.000Z", "completeDate": "2016-06-06T07:30:39.854Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "386682", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_windows/pull/717", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-24T21:09:53.000+0000", "updated": "2016-05-24T21:09:53.000+0000" }, { "id": "389583", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nWindows 10 Pro\r\nTi SDK: 5.4.0.v20160629063537\r\nAppc NPM: 4.2.7-2 \r\nAppc CLI: 5.4.0-23\r\nAppc Studio: 4.7.0.201606220541\r\nLumia 930: 10.0\r\nLumia 520: 8.1\r\n\r\nWhen using Ti.Blob.imageAs methods on a non-image, the app no longer crashes.\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-06-30T15:26:12.000+0000", "updated": "2016-06-30T15:26:12.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }