{ "id": "154907", "key": "TIMOB-20396", "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-04-05T15:52:53.000+0000", "created": "2016-02-13T13:21:32.000+0000", "epic": { "id": 155643, "key": "TIMOB-20555", "name": "iOS: Move codebase to main-thread", "summary": "iOS: Move codebase to main-thread", "color": { "key": "color_4" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "mainthread", "qe-5.4.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-07-29T21:39:24.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": "Not sure how to proper name this ticket, but it's something with the going wrong. So whenever we want to create a {{Ti.UI.iOS.*}} proxy e.g. {{Ti.UI.iOS.Toolbar}} or {{Ti.UI.iOS.LivePhotoView}} inside a callback of a {{Ti.Media.openPhotoGallery}} (and probably other async callbacks), the proxy cannot be found and it throws the attached error. Example:\r\n\r\n{code:javascript}\r\nTi.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO, Ti.Media.MEDIA_TYPE_LIVEPHOTO],\r\n success: function(e) {\r\n var toolbar = Ti.UI.iOS.createToolbar({\r\n width: 300,\r\n height: 30,\r\n backgroundColor: \"#f00\"\r\n });\r\n win.add(toolbar);\r\n }\r\n });\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor: \"#fff\"});\r\nwin.open();\r\n{code}\r\n\r\nThe example will crash as soon as the callback is invoked. If we call it directly, the app wont crash. Note: The warning {{\\[WARN\\] Creating \\[object TiUIiOS\\] in a different context than the calling function.}} is logged before the crash. So it might be related to TIMOB-20397, although the {{TiUIiOSProxy}} gets initialized correctly with {{\\[\\[TiUIiOSProxy alloc\\] _initWithPageContext:\\[self executionContext\\]\\];}}. ", "attachment": [ { "id": "58588", "filename": "Simulator Screen Shot 11.03.2016, 13.32.54.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-11T12:36:09.000+0000", "size": 79881, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Main-Thread: Cannot create proxies in callbacks", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 614, "state": "closed", "name": "2016 Sprint 07 SDK", "startDate": "2016-03-26T00:38:56.432Z", "endDate": "2016-04-09T00:38:00.000Z", "completeDate": "2016-04-11T04:41:08.231Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "379529", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~penrique] Added some more infos and screenshots.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-11T12:35:51.000+0000", "updated": "2016-03-11T12:35:51.000+0000" }, { "id": "379792", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7847", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-15T22:35:09.000+0000", "updated": "2016-03-15T22:35:09.000+0000" }, { "id": "391912", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "[~hansknoechel]\r\n\r\n [~wluu] and I have been unable to reproduce the issue above, do you have any more steps or ENV details that could help.\r\n\r\nThanks ", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-07-28T22:51:15.000+0000", "updated": "2016-07-28T22:51:15.000+0000" }, { "id": "391967", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jlongton] Probably because it has been fixed / merged since a while. So if the above examples runs through, it's great and as supposed to be!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-29T11:01:36.000+0000", "updated": "2016-07-29T11:01:36.000+0000" }, { "id": "392038", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed.\r\nTested on:\r\n\r\n{code:java}\r\niPhone 6s (9.3.1)\r\niOS Simulator (9.3)\r\n
Mac OSX El Capitan 10.11.6\r\nStudio: 4.7.0.201607130543\r\n
Ti SDK: 5.4.0.v20160727143921\r\n
Appc NPM: 4.2.7\r\nAppc CLI: 5.4.0-37\r\nNode: v4.4.4\r\n{code}\r\n\r\n*Closing issue.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-07-29T21:39:01.000+0000", "updated": "2016-07-29T21:39:01.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }