{ "id": "173627", "key": "TIMOB-27080", "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": "20791", "name": "Release 8.0.2", "archived": false, "released": true, "releaseDate": "2019-06-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-06-17T18:21:06.000+0000", "created": "2019-05-14T13:43:43.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" }, { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2019-06-17T18:21: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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "This is the follow-up ticket of TIMOB-27053. That ticket fixed some critical issues in regards to JSCore crashes, but now we still see *a lot* (on older iPhones every time) dead locks that cause the app to freeze and crash later. The worst thing is that those logs also do not show up on Crashlytics, so cannot know exactly where it crashes, although I assume it is JSCore as well.\r\n\r\nNotable is that before every crash, it shows the following warning:\r\n{code}\r\n[DEBUG] Firing app event: memorywarning\r\n{code}\r\n\r\nAs discussed with [~jvennemann], this is likely the reason why it crashes - a deadlock in firing the event. Unfortunately he was not able to provide a workaround or fix to test so far, so we are escalating this ticket now.", "attachment": [], "flagged": false, "summary": "iOS: Memory leak and deadlock in SDK 8+", "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": 1141, "state": "closed", "name": "2019 Sprint 12", "startDate": "2019-06-03T22:00:37.435Z", "endDate": "2019-06-14T22:00:00.000Z", "completeDate": "2019-06-15T03:44:20.826Z", "originBoardId": 114 }, { "id": 1136, "state": "closed", "name": "2019 Sprint 11", "startDate": "2019-05-18T17:39:52.830Z", "endDate": "2019-05-31T17:39:00.000Z", "completeDate": "2019-06-04T21:37:11.485Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "448391", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~hknoechel] It looks like you have a listener on this event in your app? If you add some logging at the beginning/end of that listener do you see that it gets fired and finishes? The log certainly lets us know the app is getting {{didReceiveMemoryWarning:}} called, but it doesn't really narrow it down to whether there's a deadlock in firing the event to listeners in JS, or if it happens to get as far as firing to the listeners but never returns, or does finish firing and hangs/crashes later on (in native SDK code on this or other proxies).\r\n\r\nI also assume that TIMOB-26967 may be leading this to occur much more frequently on production/device builds not under the CLI.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-05-15T14:37:47.000+0000", "updated": "2019-05-15T14:37:47.000+0000" }, { "id": "448393", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Chris! We are currently updating our fork with the logger fixes and will report soon. Independently, you can trigger the memory warning deadlock by triggering it from the iOS Simulator menu setting \"Simulate memory warning\" which will freeze the app immediately.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-05-15T15:23:39.000+0000", "updated": "2019-05-15T15:23:39.000+0000" }, { "id": "448394", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Assigning to Jan as per discussion in standup, sounds like he may have an idea where this is happening.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-05-15T15:38:45.000+0000", "updated": "2019-05-15T15:38:45.000+0000" }, { "id": "448399", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "You were right [~jvennemann], that busy loop was definitely the cause.\r\n\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/10893\r\n8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10894", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-05-15T17:29:49.000+0000", "updated": "2019-05-15T17:29:49.000+0000" }, { "id": "449127", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged manually to 8_0_X, 8_1_X and master.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-06-17T16:39:27.000+0000", "updated": "2019-06-17T16:39:27.000+0000" }, { "id": "449139", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS 10.14.3\r\nTi SDK: 8.0.2.v20190617094142\r\nAppc CLI: 7.0.11\r\nNode: 10.13.0\r\nJDK: 1.8.0_144\r\nXCode: 10.2.1\r\niOS Device: iPhone 6s (v12.1.4)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-17T18:21:06.000+0000", "updated": "2019-06-17T18:21:06.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }