{ "id": "170214", "key": "TIMOB-25476", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2017-11-06T07:32:51.000+0000", "created": "2017-11-03T04:57:51.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-08-06T17:52:08.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": "true \r\n\r\nios app crashes with the following crashlog.\r\n\r\nHave seen on lower sdks as well.\r\nHappens both on iOS simulator and on device.\r\nTested on SDK: 6.3.0.GA \r\nXcode 9.\r\niOS 11.\r\n\r\nThis is stopping our team from using jscore/and safari debugger benefits, which is meant to be default soon in Ti 7+.\r\nAlso stopping Hyperloop adoption.\r\n\r\ndevice.log attached for device app crash.", "attachment": [ { "id": "63526", "filename": "device.log", "author": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "created": "2017-11-03T04:56:00.000+0000", "size": 83992, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: JSCore enabled app crashes ios app", "creator": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "subtasks": [], "reporter": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "environment": null, "closedSprints": [ { "id": 963, "state": "closed", "name": "2017 Sprint 22 SDK", "startDate": "2017-10-22T21:43:59.523Z", "endDate": "2017-11-05T22:43:00.000Z", "completeDate": "2017-11-06T16:33:42.425Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "430055", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Anthony, I'd like to check this out asap. Does it crash immediately after starting the app and does it also reproduce with a new project? Unfortunately there is no test-case attached, so we won't be able to do much at this point. *EDIT*: It looks like being related to closing a window inside a tabgroup that fires events?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-03T09:32:42.000+0000", "updated": "2017-11-03T09:45:05.000+0000" }, { "id": "430057", "author": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "body": "Hi [~hknoechel],\r\n\r\nI'm not sure what test case to provide because I don't understand what is going on.\r\nThe app crashes about a minute into opening. I don't need to do anything. Just wait about a minute.\r\n\r\nYou mentioned...\r\n\"It looks like being related to closing a window inside a tabgroup that fires events?\"\r\n\r\nIf there is anything else that you might be able to interpret from the log - that'd be much appreciated. I had trouble understanding the log.I will trace fireevents with windows attached to the tabgroup.\r\n\r\nThanks,\r\nAnthony\r\n", "updateAuthor": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "created": "2017-11-03T10:15:42.000+0000", "updated": "2017-11-03T10:15:42.000+0000" }, { "id": "430068", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The important lines are these ones (from the bottom to the top):\r\n{code}\r\n6 myApp \t0x0000000102c9d644 -[TiProxy fireEvent:withObject:withSource:propagate:reportSuccess:errorCode:message:] + 808516 (TiProxy.m:1010)\r\n17 myApp \t0x0000000102c19400 -[TiViewProxy fireEvent:withObject:withSource:propagate:reportSuccess:errorCode:message:] + 267264 (TiViewProxy.m:1852)\r\n18 myApp \t0x0000000102da692c -[TiWindowProxy windowDidClose] + 1894700 (TiWindowProxy.m:0)\r\n19 myApp \t0x0000000102c2c1d4 -[TiUIWindowProxy windowDidClose] + 344532 (TiUIWindowProxy.m:249)\r\n20 myApp \t0x0000000102da9224 -[TiWindowProxy closeOnUIThread:] + 1905188 (TiWindowProxy.m:0)\r\n21 myApp \t0x0000000102da7c3c __23-[TiWindowProxy close:]_block_invoke + 1899580 (TiWindowProxy.m:347)\r\n22 myApp \t0x0000000102ccd540 TiThreadPerformOnMainThread + 1004864 (TiBase.m:316)\r\n23 myApp \t0x0000000102da7bfc -[TiWindowProxy close:] + 1899516 (TiWindowProxy.m:349)\r\n24 myApp \t0x0000000102c4afb8 -[TiUITabProxy closeWindowProxy:animated:] + 470968 (TiUITabProxy.m:194)\r\n25 myApp \t0x0000000102c4a37c __30-[TiUITabProxy cleanNavStack:]_block_invoke + 467836 (TiUITabProxy.m:87)\r\n26 myApp \t0x0000000102ccd540 TiThreadPerformOnMainThread + 1004864 (TiBase.m:316)\r\n27 myApp \t0x0000000102c49ef8 -[TiUITabProxy cleanNavStack:] + 466680 (TiUITabProxy.m:95)\r\n28 myApp \t0x0000000102c4add8 -[TiUITabProxy removeFromTabGroup] + 470488 (TiUITabProxy.m:169)\r\n29 myApp \t0x0000000102c6ef10 -[TiUITabGroupProxy dealloc] + 618256 (TiUITabGroupProxy.m:33)\r\n30 myApp \t0x0000000102bff238 -[KrollObject dealloc] + 160312 (KrollObject.m:507)\r\n31 myApp \t0x0000000102bfd8ac KrollFinalizer + 153772 (KrollObject.m:132)\r\n{code}\r\nIt looks like the tab-groups gets closed and all tabs / windows inside it as well. Also, using an new project (actually with Hyperloop enabled to be sure). It runs since ~ 10min now and working fine. It *could* be a global event like Ti.App.fireEvent that may fire unexpectedly.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-03T15:14:33.000+0000", "updated": "2017-11-03T15:39:26.000+0000" }, { "id": "430138", "author": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "body": "Hi [~hknoechel]!\r\n\r\nYour extra comments were much appreciated. I was able to fix the bug as a result.\r\n\r\nJScore looks like it handles setTimeout differently. I don't understand how or why, but when the app calls a setTimeout function after the tabgroup creation, it will crash... if it calls the setTimeout before the tabgroup creation it won't crash.\r\n\r\nI am using a timeout delay because the tabgroup is heavy and wanted to put some time padding to clear the password on the login screen in the background after the user sees the screen they logged into.\r\n\r\nI will need to try and find out more about how setTimeouts behave with Jscore enabled. \r\nThis code has been here for a long time and doesn't crash with previous non-jscore.\r\n\r\nThanks so much,\r\nAnthony\r\n\r\nCode snippets below.\r\n\r\n{code:javascript}\r\n// will crash with jscore if timeout is placed after\r\ncreateAndOpenTabGroup();\r\n\r\nsetTimeout(function() {\r\n\t\thideProgressScreen();\r\n\t\t$.password.value = \"\";\r\n\t\tenableButtons();\r\n}, 1500);\r\n{code}\r\n\r\n{code:javascript}\r\n// no crash with jscore if timeout is placed before\r\nsetTimeout(function() {\r\n\t\thideProgressScreen();\r\n\t\t$.password.value = \"\";\r\n\t\tenableButtons();\r\n}, 1500);\r\n\r\ncreateAndOpenTabGroup();\r\n{code}", "updateAuthor": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "created": "2017-11-06T03:15:09.000+0000", "updated": "2017-11-06T03:15:09.000+0000" }, { "id": "430142", "author": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "body": "Spoke too soon. Crash still occurring. Thank anyway for pointing me in the right direction.\r\nI'll keep digging.\r\n\r\nYou can close this ticket. It must be code specific. If I can recreate the issue, I will file a separate ticket. \r\nMuch appreciated [~hknoechel].", "updateAuthor": { "name": "threethirds", "key": "threethirds", "displayName": "Anthony Chung", "active": true, "timeZone": "Australia/Sydney" }, "created": "2017-11-06T05:28:38.000+0000", "updated": "2017-11-06T05:28:38.000+0000" }, { "id": "430146", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks [~threethirds]. We'll still keep an eye on this one. Using JSCore actually used Apple's build-in JSCore-framework instead of our custom one, which is the future of Titanium and enables pretty interesting things like ES6 already. We may handle {{setTimeout}} too manual right now, so you don't need to change to much in the future. Let us know if you see any other problems!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-06T07:34:59.000+0000", "updated": "2017-11-06T07:34:59.000+0000" }, { "id": "440291", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as \"not our bug\". If you disagree, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:52:08.000+0000", "updated": "2018-08-06T17:52:08.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }