{ "id": "175971", "key": "TIMOB-28324", "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": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" }, { "id": "21212", "description": "", "name": "Release 9.3.3", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-05-18T18:28:50.000+0000", "created": "2021-01-20T10:49:12.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "file", "iOS", "image" ], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-05-18T18:28:54.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "On iOS the 2nd image which is being read in by filereader is not being loaded but on Android it works as expected. \r\n\r\n*+Test Case:+*\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\n\r\n\r\nvar earthFile,\r\n earthFileStream,\r\n earthBuffer;\r\n\r\nfunction fileReader(args) {\r\n if (args.bytesProcessed === -1) {\r\n Ti.API.error('Done');\r\n Ti.API.info(earthBuffer.toBlob().height + ' . ' + earthBuffer.toBlob().width + ' . ' + earthBuffer.toBlob().mimeType);\r\n earthImage.image = earthBuffer.toBlob();\r\n Ti.API.info(earthImage.image.height + ' . ' + earthImage.image.width + ' . ' + earthImage.image.mimeType);\r\n earthBuffer.release();\r\n earthImage.animate({\r\n opacity: 1,\r\n duration: 100\r\n });\r\n } else {\r\n Ti.API.error(args.bytesProcessed + ' of ' + args.totalBytesProcessed);\r\n if (earthBuffer === null) {\r\n earthBuffer = Ti.createBuffer();\r\n }\r\n earthBuffer.append(args.buffer);\r\n }\r\n}\r\n\r\nfunction loadEarth() {\r\n earthImage.image = null;\r\n earthImage.opacity = 0;\r\n earthFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '/Earth.jpg');\r\n earthFileStream = Ti.Filesystem.openStream(Ti.Filesystem.MODE_READ, earthFile.nativePath);\r\n earthBuffer = null;\r\n Ti.Stream.pump(earthFileStream, fileReader, 512, true);\r\n}\r\n\r\nvar fishImage = Ti.UI.createImageView({\r\n left: '10dp',\r\n top: '10dp',\r\n right: '10dp',\r\n height: '200dp',\r\n image: '/ClownFish.jpg'\r\n});\r\nwin.add(fishImage);\r\n\r\nvar earthImage = Ti.UI.createImageView({\r\n left: '10dp',\r\n bottom: '10dp',\r\n right: '10dp',\r\n height: '200dp',\r\n opacity: 0\r\n});\r\nearthImage.addEventListener('singletap', loadEarth);\r\nwin.add(earthImage);\r\n\r\nloadEarth();\r\nwin.open();\r\n{code}\r\n\r\n\r\n*+Test Steps:+*\r\n# Create an application with the test case above \r\n# Make sure app thinning is disabled in the tiapp.xml\r\n# add the two images attached below into the resources folder \r\n# Run application on iOS \r\n\r\n*+Actual result:+*\r\n2nd image does not load and nothing is logged in the console.\r\n\r\n*+Expected result:+*\r\n2nd image should load and log the following \r\n{code:java}\r\n[ERROR] \b\b \bDone\r\n[INFO] \b\b \b 1600 . 2560 . image/jpeg\r\n[INFO] \b\b \b 1600 . 2560 . image/jpeg\r\n{code}\r\n", "attachment": [ { "id": "67774", "filename": "ClownFish.jpg", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-20T10:49:08.000+0000", "size": 1044897, "mimeType": "image/jpeg" }, { "id": "67773", "filename": "Earth.jpg", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-20T10:49:10.000+0000", "size": 1860714, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS: image from filereader function not being called ", "creator": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "MacOS Big Sur: 11.1 Beta 1\r\nXcode: 12.23\r\nJava Version: 1.8.0_242\r\nAndroid NDK: 21.3.6528147\r\nNode.js: 12.18.1\r\n\"\"NPM\":\"5.0.0\",\"CLI\":\"8.1.1\"\"\r\niPhone 8 14.2", "closedSprints": [ { "id": 1220, "state": "closed", "name": "2021 Sprint 6", "startDate": "2021-03-15T03:31:12.088Z", "endDate": "2021-03-27T03:31:00.000Z", "completeDate": "2021-03-26T19:18:15.760Z", "originBoardId": 114 }, { "id": 1224, "state": "closed", "name": "2021 Sprint 10", "startDate": "2021-05-17T16:31:32.484Z", "endDate": "2021-05-28T16:31:00.000Z", "completeDate": "2021-05-28T22:15:02.543Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "458436", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Workaround is add following line - \r\n earthFileStream.addEventListener('pump', fileReader);\r\n inside function loadEarth .\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-16T22:17:11.000+0000", "updated": "2021-03-16T22:17:11.000+0000" }, { "id": "458443", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR - https://github.com/appcelerator/titanium_mobile/pull/12616", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-18T00:20:10.000+0000", "updated": "2021-03-18T00:20:10.000+0000" }, { "id": "458460", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for Jenkins build", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-22T22:43:42.000+0000", "updated": "2021-03-22T22:43:42.000+0000" }, { "id": "458469", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master, 10_0_X and 9_3_X branches.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-03-23T18:08:42.000+0000", "updated": "2021-03-23T18:08:42.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }