{ "id": "174450", "key": "TIMOB-27875", "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": "21201", "description": "", "name": "Release 10.1.0", "archived": false, "released": true, "releaseDate": "2021-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-09-01T21:34:30.000+0000", "created": "2019-11-20T12:08:57.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "58390", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "173822", "key": "TIMOB-27207", "fields": { "summary": "TableView / TableViewRow memory leak", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-09-01T21:34:30.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": "After updating from 8.1.0.GA to 8.2.1.GA we are seeing a new crash related to Ti.UI.ListItem rapidly growing in production. The crash is happening random places in the app where we are using ListViews.\r\nAnd we haven't touched our code between SDK upgrades.\r\n{code:java}\r\nTiUIListItem.m line 579\r\n-[TiUIListItem recordChangeValue:forKeyPath:withBlock:]\r\n{code}\r\n\r\nI have attached crashlog. Hope it's sufficient, for you guys to know what is the cause for this crash.\r\n\r\nUPDATE: Crash is still happening with 8.3.0.GA in production. \r\n\r\n\r\n", "attachment": [ { "id": "67154", "filename": "2019-11-25_09-11-05.9647_+0100-8a6b6a0da02deef725569687eeacbbc3777553b3.crash", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-11-27T12:07:16.000+0000", "size": 107180, "mimeType": "application/octet-stream" }, { "id": "67158", "filename": "2019-11-26_23-04-00.5542_+0100-5bbf81fd8edf5da6194d0a075792dfc5738c7e4f.crash", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-11-28T19:37:21.000+0000", "size": 110618, "mimeType": "application/octet-stream" }, { "id": "67157", "filename": "2019-11-27_23-57-00.5129_+0100-b0817bdf7536e44836abbdd5d4ed923f88a751ac.crash", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-11-28T19:37:21.000+0000", "size": 119139, "mimeType": "application/octet-stream" }, { "id": "67958", "filename": "crash-log-20210805.log", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-05T07:28:20.000+0000", "size": 116269, "mimeType": "text/plain" }, { "id": "67870", "filename": "Screenshot 2021-04-13 at 20.08.47.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-04-13T18:08:54.000+0000", "size": 253625, "mimeType": "image/png" }, { "id": "67956", "filename": "TitaniumKit.xcframework.zip", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-07-30T01:25:17.000+0000", "size": 3986473, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Crash on TiUIListItem.m line 579", "creator": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS", "closedSprints": [ { "id": 1201, "state": "closed", "name": "2020 Sprint 14", "startDate": "2020-07-06T15:40:00.000Z", "endDate": "2020-07-17T15:40:00.000Z", "completeDate": "2020-07-20T22:16:28.367Z", "originBoardId": 114 }, { "id": 1202, "state": "closed", "name": "2020 Sprint 15", "startDate": "2020-07-20T22:16:05.601Z", "endDate": "2020-07-31T22:16:00.000Z", "completeDate": "2020-08-03T20:27:12.585Z", "originBoardId": 114 }, { "id": 1203, "state": "closed", "name": "2020 Sprint 16", "startDate": "2020-08-03T20:57:55.114Z", "endDate": "2020-08-14T20:57:00.000Z", "completeDate": "2020-08-14T15:19:51.647Z", "originBoardId": 114 }, { "id": 1204, "state": "closed", "name": "2020 Sprint 17", "startDate": "2020-08-17T15:48:00.000Z", "endDate": "2020-08-28T15:48:00.000Z", "completeDate": "2020-08-31T15:36:28.040Z", "originBoardId": 114 }, { "id": 1195, "state": "closed", "name": "2020 Sprint 10", "startDate": "2020-05-08T16:37:58.282Z", "endDate": "2020-05-22T16:37:00.000Z", "completeDate": "2020-05-21T15:26:11.089Z", "originBoardId": 114 }, { "id": 1196, "state": "closed", "name": "2020 Sprint 11", "startDate": "2020-05-26T15:56:00.000Z", "endDate": "2020-06-05T15:56:00.000Z", "completeDate": "2020-06-08T21:05:50.356Z", "originBoardId": 114 }, { "id": 1198, "state": "closed", "name": "2020 Sprint 12", "startDate": "2020-06-08T21:06:41.849Z", "endDate": "2020-06-19T21:06:00.000Z", "completeDate": "2020-06-19T15:54:38.493Z", "originBoardId": 114 }, { "id": 1199, "state": "closed", "name": "2020 Sprint 13", "startDate": "2020-06-19T16:41:04.099Z", "endDate": "2020-07-02T16:41:00.000Z", "completeDate": "2020-07-02T15:37:12.455Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "452927", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any updates on this one? Are we the only ones seeing this?", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-11-27T08:29:43.000+0000", "updated": "2019-11-27T08:29:43.000+0000" }, { "id": "452946", "author": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello [~jonasfunk], Would you please share us a couple more crash reports by which we can find the exact issue? Thanks ", "updateAuthor": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-11-28T18:44:11.000+0000", "updated": "2019-11-28T18:44:11.000+0000" }, { "id": "452947", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've attached two more crash logs. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-11-28T19:39:22.000+0000", "updated": "2019-11-28T19:39:22.000+0000" }, { "id": "453038", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Do you need anymore from me? Will happily help in any way I can.", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-05T09:06:57.000+0000", "updated": "2019-12-05T09:06:57.000+0000" }, { "id": "453332", "author": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We are still investigating on your log and trying to find the root cause. Hope we will back to you soon with some update. Thanks", "updateAuthor": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-12-29T13:55:44.000+0000", "updated": "2019-12-29T13:55:44.000+0000" }, { "id": "453735", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any way we temporarily patch the code to avoid the crash? Tried inserting try catch in both javascript and TiUIListItem.m with no luck. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-17T15:10:19.000+0000", "updated": "2020-01-17T15:10:19.000+0000" }, { "id": "454324", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jonasfunk] are you able to reproduce this on a development build at all? I have a rough idea what's going from the crash logs but having a reproducible test case would really help to collect valuable additional info to properly debug this. I wasn't able to reproduce this yet.\r\n\r\nAnything else that might help to pin this down? A specific list view that causes the crash? What views are used inside the list view rows that cause the crash?", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-19T00:55:13.000+0000", "updated": "2020-02-19T00:55:13.000+0000" }, { "id": "454334", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for responding to this issue.\r\nWe cannot recreate crashes consistently. We rarely experience it when we test which corresponds well with what we see in Crashlytics. Approx. 10% of our users experience a crash over a 7 day period, which amounts to approx 10.000 users. \r\nFurthermore we can also see, that it is not necessarily long sessions (memory build up of some sort) that trigger the crash. Crashes occur on both short and long sessions.\r\n\r\nWe've run the app on Titanium since 2011, and almost never had any issues on iOS. Until recently. \r\nWe used to have issues with Android, but now that's turned upside down. With 8.x our Android app is now almost crash free, while iOS is another story. \r\n\r\nTo give you an idea of what our app does: It's a marketplace app where ListViews are used extensively throughout the app. \r\n\r\nThrough Crashlytics we can see the views that are generating crashes - all with Ti.UI.Listviews.\r\n* *The listing details view*. Shows listing details and public comments. \r\n* *The private comments view.* Shows private comments - opened from listing details view. \r\n* *The activities view*. All buy/sell/comment notifications are listed here. This is the only view we've seen crash in development.\r\n\r\nApart from that, we have a view that is used to show a grid of listings - also a Ti.UI.Listview. This is a widget and used many places in the app. This view +never+ crashes. This view is used in eg.:\r\n* *The listings overview*\r\n* *The listings of a single user*\r\n* *Favorites*\r\n* *Search results*\r\n\r\nThere is no apparent difference between the views used in our grid ListView, and the ListViews that are crashing.\r\nThey all have View, Label and an implementation of SDWebimage to handle image display/caching. \r\n
Come to think of it – what differs between the views is, that even though our listings grid has ListItem height set to Ti.UI.SIZE, our listings never change in size. All the crashing ListViews have dynamic ListItem height, and their height change. Could that be the culprit? I've read that Ti.UI.SIZE on ListItems is discouraged, but our ListItems must have dynamic heights in order to show eg. comments of different lengths. \r\n\r\nIf you wish, I will gladly send you samples of our code. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-19T13:46:11.000+0000", "updated": "2020-02-19T13:46:11.000+0000" }, { "id": "454335", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for all the details! Code samples would indeed be a tremendous help! Please feel free to send me anything you can share to [mailto:jvennemann@axway.com]. Especially the list item template setup and anything else related to interaction with the list view that may cause it to refresh, like events or data reloads.\r\n\r\nBTW, the crash seems to appear when the list view is (re)drawing rows, so repeatedly scrolling up and down through the list views should provoke a crash more likely. Maybe this can help you to pin down a view to consistently reproduce the crash.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-19T14:00:02.000+0000", "updated": "2020-02-19T14:00:02.000+0000" }, { "id": "454336", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok, I will prepare something for you. \r\nWe have never seen the app crash while scrolling, but more instantly when loading a view. \r\nWill two consequtive calls to setItems trigger the same flow as scrolling? ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-19T14:46:54.000+0000", "updated": "2020-02-19T14:46:54.000+0000" }, { "id": "454426", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok interesting. That scrolling provokes the crash was just an assumption from my side after checking the crash logs, so i may be wrong there. Hit me up as soon as you have some example code ready.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-25T15:30:04.000+0000", "updated": "2020-02-25T15:30:26.000+0000" }, { "id": "454454", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've done some more digging into this issue, and I am almost certain that the crash happens when updating our activities view. I have sent screen recordings of the app together with sample code of that view directly to you.\r\nLooking at our Crashlytics log, I can se the that all crashes happen when the user at some point in her session has opened that view from bottom tab bar. When activities view is opened in a session, that view is continuously updated in the background to reflect the current state of notifications.\r\n\r\nTo decide if notifications needs to be updated, we poll an endpoint which gives us the latest update timestamp of notifications. \r\nThis is done every 30 sec., or whenever an action should initialise an update eg. marking a notification as read. \r\nIf notifications needs to be loaded, we fetch the entire notification feed and set the parsed result by calling setItems on the ListView section. \r\n\r\nRealising that our activities view could be the reason for our crashes, I created a stress test targeted setItems method of the ListView in activities view. \r\n\r\nThis is what I did: \r\n\r\n{code:java}\r\nfor(var i=0; i<1000; i++){\r\n await delayedNotificationUpdateWithData(require('/activities/testData01')); \r\n await delayedNotificationUpdateWithData(require('/activities/testData02'));\r\n}\r\n\r\nfunction delayedNotificationUpdateWithData(data){\r\n return new Promise(resolve => {\r\n setTimeout(()=>{ setNotifications(data); resolve(); },50);\r\n });\r\n}\r\n{code}\r\n\r\n\r\n* testData02 is a snapshot of notification data taken from a user directly after that user experienced a crash.\r\n* To simulate an update the first two notifications in testData02 has been removed in testData01. \r\n* The test is initialised immediately in the activities controller.\r\n* About 20 ListItems is set on each update. In production ListItem count is max. 100. \r\n* All other events that would normally trigger notification updates are disabled. \r\n* SetItem is called after postlayout on ListView. \r\n\r\n*Running this test actually makes it much easier to reproduce the crash.*\r\n\r\nWhile testing (on iPhone 11 device) I discovered the following:\r\n\r\nStaying on the activities view:\r\n\t– Sometimes the app can complete the procedure (video1).\r\n\t– Sometimes the app crashes immediately upon opening activities view, as we've seen happen in development and for users.\r\n\t\r\nNavigating away from the view and opening item detail views, sometimes just once(video2), sometimes multiple times(video3), will almost always crash the app - still with the same crash message regarding TiUIListItem. \r\n\r\nThis is our observations - what do you make of it?\r\n\r\nIn our next release, we will try to make sure activities ListView is not updated in the background, but only when in focus.\r\nThis should at least take some of the crashes, but I would expect activities to still crash upon opening the view. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-26T13:57:07.000+0000", "updated": "2020-02-26T13:57:07.000+0000" }, { "id": "454677", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Update: We've sent a version to one of our very active users, where we did not update activities in background + added some more logging. The app still crashes, also when activities view is not opened, so my assumption regarding that activities view was the one that caused crashes was wrong. Seems like its a generic ListView issue. \r\nHave you looked further into the issue?", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-12T11:14:10.000+0000", "updated": "2020-03-12T11:14:10.000+0000" }, { "id": "454869", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any update?", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-26T09:52:16.000+0000", "updated": "2020-03-26T09:52:16.000+0000" }, { "id": "455139", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Jan Vennemann The silence is killing me. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-15T08:44:47.000+0000", "updated": "2020-04-15T08:44:47.000+0000" }, { "id": "455169", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jonasfunk] sorry for the long silence. I was caught up in other projects and unfortunately didn't have time to further look into the issue yet.\r\n\r\nWould it be possible for you to provide us access to your complete code base, including the stress test you mentioned in a previous comment that makes it easier to reproduce the issue? We didn't receive any similar reports for crashes like this and also were not able to reproduce it. Having a complete project that reliably reproduces the project will allow us to debug this issue right at our core.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-04-17T12:30:15.000+0000", "updated": "2020-04-17T12:30:15.000+0000" }, { "id": "455170", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for replying Jan! 
I would love to send you our complete project, but to spare you from having to go through a lot of really old and ugly code, I will try to create a minimal app, with some of our code, that can reproduce the issue. If that doesn't work, I will send you the entire project. I'll be in touch.", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-17T12:53:12.000+0000", "updated": "2020-04-17T12:53:12.000+0000" }, { "id": "455323", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've sent you an email Jan with a link to a minimal app reproducing the issue. Let me know if you have any questions.", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-01T11:29:48.000+0000", "updated": "2020-05-01T11:29:48.000+0000" }, { "id": "455339", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jonasfunk] thanks a ton for your time to create the test case, greatly appreciated! I was able to reproduce the crash. Also send this to [~vijaysingh] so he can take a look as well. We'll let you know when we have any updates.\r\n\r\nBTW: Nice usage of TypeScript in your app! (y)", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-05-04T08:54:03.000+0000", "updated": "2020-05-04T09:06:00.000+0000" }, { "id": "455349", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] Thank you. Really happy to hear, you were able to reproduce the crash with the test project. As for the TypeScript part, this just makes are huge difference for us in regards to eg. getting strong typing and catching errors at compile time. [Mathias Lorenzen|https://github.com/ffMathy] assisted us in setting up Typescript for our project. If you see anything you like in how we have applied TypeScript in an Alloy context, you are welcome to get inspiration :). ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-04T14:07:27.000+0000", "updated": "2020-05-04T14:07:27.000+0000" }, { "id": "455505", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "Any update on this? We are upgrading from Ti SDK 8.1 to 8.3.1 and also have a lot of ListViews in our app, and are now seeing a ton of crashes at the exact same spot [TiUIListItem recordChangeValue:forKeyPath:withBlock:] - please advise.", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2020-05-19T15:40:36.000+0000", "updated": "2020-05-19T15:40:36.000+0000" }, { "id": "455512", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~btknorr] We are working on this. I'll update you here as soon as I get anything.\r\nMeanwhile can you let me know -\r\n1. If the crash is not happening on SDK 8.1.0.GA?\r\n2. Is it crashing for 8.2.0.GA and 9.0.0.GA as well ?\r\n3. Do you have any small test case, which you can share with me .\r\n\r\nThanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-19T19:02:05.000+0000", "updated": "2020-05-19T19:02:05.000+0000" }, { "id": "455514", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "I believe it is happening on 8.1.0.GA, but just not as often. We have not tried 8.2 or 9.0. I can look into putting together a test case. Crash seems to be caused by Labels...here is a stack trace:\r\n\r\n0 com.apple.CoreText \t0x0000000106823f85 OTL::GPOS::ApplyPairPosAccelerated(OTL::Lookup const&, TGlyphIterator&) const + 1663\r\n1 com.apple.CoreText \t0x0000000106843c05 OTL::GPOS::ApplyLookups(TRunGlue&, int, OTL::GlyphLookups&, unsigned short) const + 561\r\n2 com.apple.CoreText \t0x00000001068435c6 TOpenTypePositioningEngine::PositionRuns(SyncState&, KerningStatus&) + 1392\r\n3 com.apple.CoreText \t0x00000001067a4fdc TKerningEngine::PositionGlyphs(TLine&, TCharStream const&, signed char) + 438\r\n4 com.apple.CoreText \t0x00000001067b16eb TTypesetter::FinishLayout(std::__1::tuple*, unsigned int, unsigned char> const&, TLine&, signed char, SyncState) + 35\r\n5 com.apple.CoreText \t0x00000001067c786b TTypesetterAttrString::Initialize(__CFAttributedString const*) + 865\r\n6 com.apple.CoreText \t0x00000001067c74fb TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*, __CFDictionary const*) + 163\r\n7 com.apple.CoreText \t0x00000001067b2785 CTLineCreateWithAttributedString + 85\r\n8 com.apple.UIFoundation \t0x000000011df0b95d -[NSCoreTypesetter _stringDrawingCoreTextEngineWithOriginalString:rect:padding:graphicsContext:forceClipping:attributes:stringDrawingOptions:drawingContext:wantsTextLineFragments:validatedAttributedString:firstNonRenderedCharacterIndex:foundSoftHyphenAtEOL:enginePathUsed:] + 1401\r\n9 com.apple.UIFoundation \t0x000000011df05f34 __NSStringDrawingEngine + 6080\r\n10 com.apple.UIFoundation \t0x000000011df0474a -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 187\r\n11 com.apple.UIKitCore \t0x000000011c615086 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 1456\r\n12 com.apple.UIKitCore \t0x000000011c6148b7 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 50\r\n13 com.apple.UIKitCore \t0x000000011c619de6 -[UILabel _intrinsicSizeWithinSize:] + 384\r\n14 com.starterstep.broadcast \t0x0000000105058340 -[TiUILabel padLabel] + 128 (TiUILabel.m:99)\r\n15 com.starterstep.broadcast \t0x000000010505a695 -[TiUILabel setText_:] + 133 (TiUILabel.m:421)\r\n16 com.appcelerator.TitaniumKit \t0x0000000109feea6a DoProxyDelegateChangedValuesWithProxy + 599\r\n17 com.appcelerator.TitaniumKit \t0x0000000109ff21b3 -[TiProxy replaceValue:forKey:notification:] + 648\r\n18 com.appcelerator.TitaniumKit \t0x0000000109fcde5c -[TiViewProxy setValue:forUndefinedKey:] + 212\r\n19 com.apple.Foundation \t0x00000001072ac130 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 325\r\n20 com.starterstep.broadcast \t0x00000001051238df __28-[TiUIListItem setDataItem:]_block_invoke_8 + 47 (TiUIListItem.m:501)\r\n21 com.starterstep.broadcast \t0x0000000105123cfc -[TiUIListItem recordChangeValue:forKeyPath:withBlock:] + 572 (TiUIListItem.m:580)\r\n22 com.starterstep.broadcast \t0x00000001051238a4 __28-[TiUIListItem setDataItem:]_block_invoke_7 + 388 (TiUIListItem.m:503)\r\n23 com.apple.CoreFoundation \t0x000000010ac85d87 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 7\r\n24 com.apple.CoreFoundation \t0x000000010ac5ef8e -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 238\r\n25 com.starterstep.broadcast \t0x00000001051236eb __28-[TiUIListItem setDataItem:]_block_invoke_6 + 395 (TiUIListItem.m:504)\r\n26 com.apple.CoreFoundation \t0x000000010ac85d87 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 7\r\n27 com.apple.CoreFoundation \t0x000000010ac5ef8e -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 238\r\n28 com.starterstep.broadcast \t0x0000000105122d67 -[TiUIListItem setDataItem:] + 2871\r\n29 com.starterstep.broadcast \t0x000000010504d02a -[TiUIListView tableView:heightForRowAtIndexPath:] + 666 (TiUIListView.m:1847)\r\n30 com.apple.UIKitCore \t0x000000011c402b80 -[UITableView _dataSourceHeightForRowAtIndexPath:] + 130\r\n31 com.apple.UIKitCore \t0x000000011c412c37 __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 369\r\n32 com.apple.UIKitCore \t0x000000011c4121ed -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 3280\r\n33 com.apple.UIKitCore \t0x000000011c415eeb -[UITableViewRowData numberOfRows] + 67\r\n34 com.apple.UIKitCore \t0x000000011c3d1320 -[UITableView noteNumberOfRowsChanged] + 117\r\n35 com.apple.UIKitCore \t0x000000011c3cfd9b -[UITableView reloadData] + 1426\r\n36 com.starterstep.broadcast \t0x0000000105042d6c -[TiUIListView updateSearchResults:] + 92 (TiUIListView.m:558)\r\n37 com.starterstep.broadcast \t0x0000000105180d2e __38-[TiUIListSectionProxy insertItemsAt:]_block_invoke + 302 (TiUIListSectionProxy.m:210)\r\n38 com.starterstep.broadcast \t0x000000010508b988 -[TiUIListViewProxy dispatchBlock:] + 168 (TiUIListViewProxy.m:130)\r\n39 com.starterstep.broadcast \t0x0000000105180b63 -[TiUIListSectionProxy insertItemsAt:] + 1203 (TiUIListSectionProxy.m:216)\r\n40 com.apple.CoreFoundation \t0x000000010ac0438c __invoking___ + 140\r\n41 com.apple.CoreFoundation \t0x000000010ac0149f -[NSInvocation invoke] + 319\r\n42 com.appcelerator.TitaniumKit \t0x0000000109fee06b -[KrollMethod call:] + 1385\r\n43 com.appcelerator.TitaniumKit \t0x0000000109fed29f __KrollCallAsFunction_block_invoke + 30\r\n44 com.appcelerator.TitaniumKit \t0x0000000109fed0b9 KrollCallAsFunction + 425\r\n45 com.apple.JavaScriptCore \t0x00000001056ae8ec JSC::JSCallbackObject::call(JSC::ExecState*) + 524\r\n46 com.apple.JavaScriptCore \t0x0000000105b82ffd JSC::LLInt::setUpCall(JSC::ExecState*, JSC::CodeSpecializationKind, JSC::JSValue", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2020-05-19T19:15:48.000+0000", "updated": "2020-05-19T19:16:39.000+0000" }, { "id": "455516", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "Here is another stack trace that seems to happen often:\r\n\r\n0 libobjc.A.dylib \t0x0000000106595785 objc_msgSend + 5\r\n1 com.apple.Foundation \t0x000000010556634c hashProbe + 516\r\n2 com.apple.Foundation \t0x0000000105566592 -[NSConcreteHashTable getItem:] + 52\r\n3 com.apple.UIFoundation \t0x000000011c19a911 +[NSAttributeDictionary newWithDictionary:] + 115\r\n4 com.apple.UIFoundation \t0x000000011c1cb903 -[_NSCachedAttributedString initWithString:attributes:] + 107\r\n5 com.apple.UIFoundation \t0x000000011c1cddb9 __NSStringDrawingEngine + 5701\r\n6 com.apple.UIFoundation \t0x000000011c1cc74a -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 187\r\n7 com.apple.UIKitCore \t0x000000011a8dd086 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 1456\r\n8 com.apple.UIKitCore \t0x000000011a8dc8b7 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 50\r\n9 com.apple.UIKitCore \t0x000000011a8e1de6 -[UILabel _intrinsicSizeWithinSize:] + 384\r\n10 com.starterstep.broadcast \t0x00000001033221ca -[TiUILabel contentWidthForWidth:] + 106 (TiUILabel.m:86)\r\n11 com.starterstep.broadcast \t0x00000001033219a6 -[TiUILabelProxy contentWidthForWidth:] + 70 (TiUILabelProxy.m:17)\r\n12 com.appcelerator.TitaniumKit \t0x000000010648c690 -[TiViewProxy autoWidthForSize:] + 100\r\n13 com.appcelerator.TitaniumKit \t0x000000010648ce9b -[TiViewProxy minimumParentWidthForSize:] + 535\r\n14 com.appcelerator.TitaniumKit \t0x000000010648c873 -[TiViewProxy autoWidthForSize:] + 583\r\n15 com.appcelerator.TitaniumKit \t0x000000010648ce9b -[TiViewProxy minimumParentWidthForSize:] + 535\r\n16 com.appcelerator.TitaniumKit \t0x000000010648c873 -[TiViewProxy autoWidthForSize:] + 583\r\n17 com.appcelerator.TitaniumKit \t0x000000010648ce9b -[TiViewProxy minimumParentWidthForSize:] + 535\r\n18 com.appcelerator.TitaniumKit \t0x000000010649229f -[TiViewProxy computeChildSandbox:withBounds:] + 154\r\n19 com.appcelerator.TitaniumKit \t0x000000010648cb6a -[TiViewProxy autoHeightForSize:] + 527\r\n20 com.appcelerator.TitaniumKit \t0x00000001064927f8 -[TiViewProxy computeChildSandbox:withBounds:] + 1523\r\n21 com.appcelerator.TitaniumKit \t0x000000010648cb6a -[TiViewProxy autoHeightForSize:] + 527\r\n22 com.appcelerator.TitaniumKit \t0x000000010648d309 -[TiViewProxy minimumParentHeightForSize:] + 580\r\n23 com.appcelerator.TitaniumKit \t0x000000010648cb9c -[TiViewProxy autoHeightForSize:] + 577\r\n24 com.appcelerator.TitaniumKit \t0x000000010648d309 -[TiViewProxy minimumParentHeightForSize:] + 580\r\n25 com.starterstep.broadcast \t0x000000010331727c -[TiUIListView tableView:heightForRowAtIndexPath:] + 1260 (TiUIListView.m:1867)\r\n26 com.apple.UIKitCore \t0x000000011a6cab80 -[UITableView _dataSourceHeightForRowAtIndexPath:] + 130\r\n27 com.apple.UIKitCore \t0x000000011a6dac37 __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 369\r\n28 com.apple.UIKitCore \t0x000000011a6da1ed -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 3280\r\n29 com.apple.UIKitCore \t0x000000011a6ddeeb -[UITableViewRowData numberOfRows] + 67\r\n30 com.apple.UIKitCore \t0x000000011a699320 -[UITableView noteNumberOfRowsChanged] + 117\r\n31 com.apple.UIKitCore \t0x000000011a697d9b -[UITableView reloadData] + 1426\r\n32 com.starterstep.broadcast \t0x000000010330cd6c -[TiUIListView updateSearchResults:] + 92 (TiUIListView.m:558)\r\n33 com.starterstep.broadcast \t0x000000010344ad2e __38-[TiUIListSectionProxy insertItemsAt:]_block_invoke + 302 (TiUIListSectionProxy.m:210)\r\n34 com.starterstep.broadcast \t0x0000000103355988 -[TiUIListViewProxy dispatchBlock:] + 168 (TiUIListViewProxy.m:130)\r\n35 com.starterstep.broadcast \t0x000000010344ab63 -[TiUIListSectionProxy insertItemsAt:] + 1203 (TiUIListSectionProxy.m:216)\r\n36 com.apple.CoreFoundation \t0x0000000108fd938c __invoking___ + 140\r\n37 com.apple.CoreFoundation \t0x0000000108fd649f -[NSInvocation invoke] + 319\r\n38 com.appcelerator.TitaniumKit \t0x00000001064ab06b -[KrollMethod call:] + 1385\r\n39 com.appcelerator.TitaniumKit \t0x00000001064aa29f __KrollCallAsFunction_block_invoke + 30\r\n40 com.appcelerator.TitaniumKit \t0x00000001064aa0b9 KrollCallAsFunction + 425\r\n41 com.apple.JavaScriptCore \t0x00000001039788ec JSC::JSCallbackObject::call(JSC::ExecState*) + 524\r\n42 com.apple.JavaScriptCore \t0x0000000103e4cffd JSC::LLInt::setUpCall(JSC::ExecState*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 365\r\n43 com.apple.JavaScriptCore \t0x000000010393fa05 llint_entry + 93212\r\n44 com.apple.JavaScriptCore \t0x000000010393f993 llint_entry + 93098\r\n45 com.apple.JavaScriptCore \t0x000000010393fa13 llint_entry + 93226\r\n46 com.apple.JavaScriptCore \t0x000000010393f993 llint_entry + 93098\r\n47 com.apple.JavaScriptCore \t0x000000010393f993 llint_entry + 93098\r\n48 com.apple.JavaScriptCore \t0x000000010393fa13 llint_entry + 93226\r\n49 com.apple.JavaScriptCore \t0x000000010393f993 llint_entry + 93098\r\n50 com.apple.JavaScriptCore \t0x0000000103940939 llint_entry + 97104\r\n51 com.apple.JavaScriptCore \t0x000000010393f993 llint_entry + 93098\r\n52 com.apple.JavaScriptCore \t0x0000000103928c3f vmEntryToJavaScript + 200\r\n53 com.apple.JavaScriptCore \t0x0000000103d3ea70 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416\r\n54 com.apple.JavaScriptCore \t0x0000000103f8b984 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 196\r\n55 com.apple.JavaScriptCore \t0x0000000103986298 JSObjectCallAsFunction + 488\r\n56 com.appcelerator.TitaniumKit \t0x000000010646d7f4 __65-[KrollObject invokeCallbackForKey:withObject:thisObject:onDone:]_block_invoke + 434\r\n57 libdispatch.dylib \t0x000000010b9cd810 _dispatch_call_block_and_release + 12\r\n58 libdispatch.dylib \t0x000000010b9ce781 _dispatch_client_callout + 8\r\n59 libdispatch.dylib \t0x000000010b9dacaa _dispatch_main_queue_callback_4CF + 1212\r\n60 com.apple.CoreFoundation \t0x0000000108f34e49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\r\n61 com.apple.CoreFoundation \t0x0000000108f2faa9 __CFRunLoopRun + 2329\r\n62 com.apple.CoreFoundation \t0x0000000108f2ee66 CFRunLoopRunSpecific + 438\r\n63 com.apple.GraphicsServices \t0x000000010e107bb0 GSEventRunModal + 65\r\n64 com.apple.UIKitCore \t0x000000011a4bcdd0 UIApplicationMain + 1621\r\n65 com.starterstep.broadcast \t0x000000010329379c main + 1212 (main.m:77)\r\n66 libdyld.dylib \t0x000000010ba4fd29 start + 1\r\n", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2020-05-19T23:59:26.000+0000", "updated": "2020-05-19T23:59:26.000+0000" }, { "id": "455569", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jonasfunk] I am still working on this. Can you confirm if crash was not there in SDK 8.1.0.GA?\r\nAnd did you try on 9.0.1.GA or 9.0.2.GA ? Is it having similar crash frequency?", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-27T22:34:07.000+0000", "updated": "2020-05-27T22:34:07.000+0000" }, { "id": "455573", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~vijaysingh] I'm glad to hear you are working on this issue. I've revisited our release history and compared that to versions where the crash occurs, and I can confirm, that the crash was *not* in 8.1.0.GA. We have not yet an app in production with SDK 9, so I'm afraid I'm not able to give you any info about that. Have you by any chance tested 8.1.0.GA with the test project I provided?", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-28T07:41:21.000+0000", "updated": "2020-05-28T07:41:21.000+0000" }, { "id": "455597", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is regression from [PR #11028|https://github.com/appcelerator/titanium_mobile/pull/11028] introduced in SDK 8.2.1.\r\nI tried to test by reverting the PR and crash is no more. \r\nProbably we have to change fix of TIMOB-27207. cc [~jvennemann]\r\n\r\nEdit - After reverting the changes, sometimes I see crash as mentioned in AC-6396.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-02T01:28:30.000+0000", "updated": "2020-06-06T01:07:18.000+0000" }, { "id": "455640", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": " [~vijaysingh] So nice that you found issue. We're crossing our fingers that this can be fixed soon. As a quick fix, and since we had no issues before 8.2.1, will we be able to revert the changes made in [PR #11028|https://github.com/appcelerator/titanium_mobile/pull/11028] without breaking things? As I understand the PR should fix proxy memory build up, but we would rather have with this, than the crashes we are seeing :)", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-04T13:20:06.000+0000", "updated": "2020-06-04T13:20:06.000+0000" }, { "id": "455701", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jonasfunk] \r\n1. Reverting the PR should not break the things.\r\n2. But sometimes I can see another crash as mentioned in comment, which was reported by you :). If that issue was not there in your app with SDK 8.1.0.GA, I think you should be fine. ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-08T22:06:22.000+0000", "updated": "2020-06-08T22:06:22.000+0000" }, { "id": "455713", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-09T12:14:21.000+0000", "updated": "2020-06-09T12:14:21.000+0000" }, { "id": "455764", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jonasfunk] quick update: We have narrowed it down to the usage of {{Ti.UI.AttributedString}} together with a {{Ti.UI.Label}} in the ListView. Sometimes the attributed string proxy gets released right before it will be assigned to the label which is causing the crash. We are now doing more investigation to see why this is happening in a list view only, and will start working on a fix as soon as we found the root issue.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-11T15:47:47.000+0000", "updated": "2020-06-11T15:47:47.000+0000" }, { "id": "455775", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] Thank for the update! Great that you found out, that {{Ti.UI.AttributedString}} causes the crash. Looking at our project, that actually makes a lot of sense, as our most used view is a {{Ti.UI.ListView}} displaying items for sale. This view doesn't use {{Ti.UI.AttributedString}} and never crashes. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-12T10:42:28.000+0000", "updated": "2020-06-12T10:42:28.000+0000" }, { "id": "456497", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] Can you give us some insight into what challenges you are up against? 9.2.0 seems pretty far away :)", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-18T08:12:34.000+0000", "updated": "2020-08-18T08:12:34.000+0000" }, { "id": "456506", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jonasfunk], the problem is that it seems totally random. Sometimes the attributed strings are retained just fine, sometimes they are wrongly GC'd right before usage in the view which causes the crash. This seemingly random behavior makes it very hard to debug and figure out what's causing the issue.\r\n\r\nI tried to reproduce the issue with forced garbage collections to provoke the crash in a consistent way, but unfortunately had no luck yet. I also had a very big project to finish for the 9.1.0 release so the time i was able to spend on this issue was limited as well. I understand that this issue is critical to you so If a solution is found before 9.2.0, we will find a way to provide you with a backport for the 9.1.x line.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-08-18T17:04:35.000+0000", "updated": "2020-08-18T17:04:35.000+0000" }, { "id": "456522", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the update [~jvennemann]. I understand the challenges – hope you will have more time available to work on this issue in the coming period. We will appreciate if you can backport a possible solution to us. (y)", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-20T07:00:19.000+0000", "updated": "2020-08-20T07:00:19.000+0000" }, { "id": "456666", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~spulipakkam], Done.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-31T18:46:53.000+0000", "updated": "2020-08-31T18:46:53.000+0000" }, { "id": "456673", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I take the latest change in priority means a solution is further away. We will consider removing attributed strings from our listviews instead of waiting for a fix in the SDK. ", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-01T07:51:28.000+0000", "updated": "2020-09-01T07:51:28.000+0000" }, { "id": "458573", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is still a very severe issue. Can someone from the team address this? Happy to provide symbolicated Xcode crash logs for this!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-04-13T18:07:51.000+0000", "updated": "2021-04-13T18:07:51.000+0000" }, { "id": "458658", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can this please please be fixed? I am willing to pay anyone (core member or community) who manages to fix this bug. ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-05-07T13:11:57.000+0000", "updated": "2021-05-07T13:11:57.000+0000" }, { "id": "458912", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Okay, so we should really get this fixed. I did some research and compared the changes between 8.2.0 and 8.2.1 (where the crash first appeared). I noticed some Garbage-collection related changes [here|https://github.com/appcelerator/titanium_mobile/compare/8.2.0...8.2.1#diff-acebe3f8a6a64a734c2a557093c0831f1ec331f1e9dab3c4fa169914c19d17faR647] which could be the root issue, because the actual crash also happens in the TiProxy class.\r\n\r\nSo how does it end up there?\r\n\r\nI checked the stack trace over and over again. It always starts in the \"cellForRowAtIndexPath:\" delegate, confirming that Jan said regarding the quick redrawing of the cells causing it. From there, it calls the \"setDataItem:\" selector, which runs into the \"default\" switch-case statement ([here|https://github.com/appcelerator/titanium_mobile/blame/master/iphone/Classes/TiUIListItem.m#L487]), where it needs to do some reproxying. \r\n\r\nBUT: Compared to other parts of the SDK where \"setReproxying:\" is called (in the Ti.UI.View and Ti.UI.TableViewRow), it does not call \"transferProxy:\", which could lead to a memory leak causing this crash.\r\n\r\nDoes this make sense? It would be great if someone could take this and help finding the final solution. It's causing really severe crashes on production that seem all random, but they all are related to this issue.\r\n\r\n*EDIT*: It has to be this one. Here is a most recent stack:\r\n{code}\r\n6 com.appcelerator.TitaniumKit \t0x000000010de8d3cd -[KrollObject forgetObjectForTiString:context:] + 110\r\n7 com.appcelerator.TitaniumKit \t0x000000010de8cc8b -[KrollObject forgetKeylessKrollObject:] + 178\r\n8 com.appcelerator.TitaniumKit \t0x000000010dea863f -[TiViewProxy setValue:forUndefinedKey:] + 212\r\n9 com.apple.Foundation \t0x00007fff207af46c -[NSObject(NSKeyValueCoding) setValue:forKey:] + 331\r\n10 io.lambus.app \t0x000000010ba4c52f __28-[TiUIListItem setDataItem:]_block_invoke_8 + 47 (TiUIListItem.m:507)\r\n11 io.lambus.app \t0x000000010ba4c937 -[TiUIListItem recordChangeValue:forKeyPath:withBlock:] + 567 (TiUIListItem.m:618)\r\n12 io.lambus.app \t0x000000010ba4c4f4 __28-[TiUIListItem setDataItem:]_block_invoke_7 + 388 (TiUIListItem.m:504)\r\n13 com.apple.CoreFoundation \t0x00007fff2037c2de __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 7\r\n14 com.apple.CoreFoundation \t0x00007fff20491884 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 255\r\n15 io.lambus.app \t0x000000010ba4c33b __28-[TiUIListItem setDataItem:]_block_invoke_6 + 395 (TiUIListItem.m:501)\r\n16 com.apple.CoreFoundation \t0x00007fff2037c2de __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 7\r\n17 com.apple.CoreFoundation \t0x00007fff20491884 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 255\r\n18 io.lambus.app \t0x000000010ba4b520 -[TiUIListItem setDataItem:] + 2864 (TiUIListItem.m:490)\r\n19 io.lambus.app \t0x000000010b9764d4 -[TiUIListView tableView:cellForRowAtIndexPath:] + 1684 (TiUIListView.m:1564)\r\n{code}\r\nIt crashes right after the \"forgetKeylessKrollObject:\" call and the change in 8.2.1 changed the behavior of the \"noteKeylessKrollObject:\" selector.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-07-28T11:58:19.000+0000", "updated": "2021-07-28T12:25:03.000+0000" }, { "id": "458919", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], I see a different issue that might be the root cause. Have a look at the KrollObject code below.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/iphone/TitaniumKit/TitaniumKit/Sources/Kroll/KrollObject.m#L927-L973\r\n\r\nThe {{noteKeylessKrollObject}} and {{forgetKeylessKrollObject}} methods call the {{TiStringCreateWithPointerValue()}} function to generate a unique property name based on a native object's pointer/memory-address. The *BIG* issue here is that it's casting a 64-bit pointer to an {{(int)}} which is 32-bit. This means there's a chance that we are wrongly generating the same name for 2 different pointers if they exceed the 32-bit bounds (ie: name collision), which would cause a wild-pointer crash the 2nd time the {{forgetKeylessKrollObject}} method gets called on a property withe name collision.\r\n\r\nThe solution of course would be to change {{TiStringCreateWithPointerValue()}} to accept a 64-bit argument.\r\n_(Even if this is not the root cause of the crash, we should make this specific change anyways because casting a 64-bit pointer to a 32-bit value is clearly the wrong thing to do.)_\r\n\r\n*Side Note:*\r\nIdeally, we should use a JS \"Symbol\" to create a unique property in order to avoid name collision, but JavaScriptCore only supports it on iOS 13 and higher.\r\nhttps://developer.apple.com/documentation/javascriptcore/jsvalue/3042804-valuewithnewsymbolfromdescriptio?language=objc\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-07-29T00:16:20.000+0000", "updated": "2021-07-29T00:38:06.000+0000" }, { "id": "458923", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12987\r\n\r\n[~hknoechel], the above PR should theoretically fix the issue, but note that I'm unable to reproduce the issue. So, this is a guess. Would you mind trying it out? Or is it hard to reproduce on your end too? (I can see this being a rare random issue.)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-07-29T04:47:12.000+0000", "updated": "2021-07-29T04:47:12.000+0000" }, { "id": "458924", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi Josh! Super interesting change. You can btw reproduce it in our project (I sent you some more details via Slack). I will test it today! Regarding unique keys: Why not use a UUID (via {{[NSUUID UUID]}}), which is pretty save to use, even for larger collections of 1M+ data sets\r\n\r\n*Update*: It is *not* crashing for me, wow. Can someone else from this ticket confirm? To ease testing, I uploaded a ready-to-go SDK here (based on the latest 10.0.1 build + the commit from Josh). Are there any side issues that could occur? The patch seems pretty stable.\r\n\r\nSteps to test:\r\n1. Download and extract the zip file [from here|https://www.dropbox.com/s/ox93xiqma3zrzhy/mobilesdk-10.0.2-osx.zip?dl=1]\r\n2. Copy the {{/mobilesdk-10.0.2-osx/mobilesdk/osx/10.0.2}} folder to {{~/Library/Application Support/Titanium/mobilesdk/osx/10.0.2}}\r\n3. Change the SDK version in your tiapp.xml to 10.0.2\r\n4. Run your app!\r\n\r\n*Update 2*: Sorry, it still crashes. It has to be something else :(", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-07-29T10:32:03.000+0000", "updated": "2021-07-29T13:41:15.000+0000" }, { "id": "458932", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] Are you able to obtain a crash log after applying Josh's PR, curious if the stack is different?\r\n\r\n*Update*: I've looked at the changes from 8.1.0 to 8.2.0 and reverted a GC related change that is related to {{TiProxy replaceValue}}, try using this TitaniumKit with the SDK you linked above (it includes Josh's change too).\r\n [^TitaniumKit.xcframework.zip] ", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-07-30T01:05:56.000+0000", "updated": "2021-07-30T01:28:19.000+0000" }, { "id": "458935", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Was it the change from Jan back then? Because that definitely fixed another GC crash back then that was even more severe because it affected all proxies (and was harder to reproduce). Critical topic.\r\n\r\nRegarding the crash: It's indeed a different one and indeed related to the {{replaceValue:}} selector:\r\n{code}\r\n0 libobjc.A.dylib \t0x00000001a064b1e0 objc_msgSend + 32\r\n1 TitaniumKit \t0x0000000106ad59d0 -[TiProxy replaceValue:forKey:notification:] + 524\r\n2 TitaniumKit \t0x0000000106ab1f58 -[TiViewProxy setValue:forUndefinedKey:] + 232\r\n3 Foundation \t0x000000018ce30fd0 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 328 (NSKeyValueCoding.m:438)\r\n4 MyApp \t0x0000000104944dec 0x104898000 + 708076\r\n5 MyApp \t0x0000000104944c30 0x104898000 + 707632\r\n6 CoreFoundation \t0x000000018bb0ea68 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24 (NSDictionaryHelpers.m:9)\r\n7 CoreFoundation \t0x000000018ba831f8 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 208 (NSDictionaryM_Common.h:315)\r\n8 MyApp \t0x0000000104944b1c 0x104898000 + 707356\r\n9 CoreFoundation \t0x000000018bb0ea68 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24 (NSDictionaryHelpers.m:9)\r\n10 CoreFoundation \t0x000000018ba831f8 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 208 (NSDictionaryM_Common.h:315)\r\n11 MyApp \t0x0000000104944294 0x104898000 + 705172\r\n12 MyApp \t0x00000001048e3c10 0x104898000 + 310288\r\n13 UIKitCore \t0x000000018e7c6acc -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 772 (UITableView.m:15068)\r\n14 UIKitCore \t0x000000018e792890 -[UITableView _updateVisibleCellsNow:] + 2324 (UITableView.m:2991)\r\n15 UIKitCore \t0x000000018e7b0b8c -[UITableView layoutSubviews] + 376 (UITableView.m:9694)\r\n16 UIKitCore \t0x000000018ead9a0c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2576 (UIView.m:17543)\r\n17 QuartzCore \t0x000000018ef60670 -[CALayer layoutSublayers] + 308 (CALayer.mm:10147)\r\n18 QuartzCore \t0x000000018ef60b54 CA::Layer::layout_if_needed(CA::Transaction*) + 548 (CALayer.mm:10014)\r\n19 QuartzCore \t0x000000018ef7578c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2485)\r\n20 QuartzCore \t0x000000018eeb75e4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 500 (CAContextInternal.mm:2510)\r\n21 QuartzCore \t0x000000018eee37f4 CA::Transaction::commit() + 684 (CATransactionInternal.mm:449)\r\n22 QuartzCore \t0x000000018eee4b20 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 96 (CATransactionInternal.mm:932)\r\n23 CoreFoundation \t0x000000018bb235e0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CFRunLoop.c:1799)\r\n24 CoreFoundation \t0x000000018bb1d704 __CFRunLoopDoObservers + 572 (CFRunLoop.c:1912)\r\n25 CoreFoundation \t0x000000018bb1dcb0 __CFRunLoopRun + 1052 (CFRunLoop.c:2953)\r\n26 CoreFoundation \t0x000000018bb1d360 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)\r\n27 GraphicsServices \t0x00000001a315b734 0x1a3158000 + 14132\r\n28 UIKitCore \t0x000000018e598584 -[UIApplication _run] + 1072 (UIApplication.m:3269)\r\n29 UIKitCore \t0x000000018e59ddf4 UIApplicationMain + 168 (UIApplication.m:4740)\r\n30 MyApp \t0x000000010489f5d4 main + 616 (main.m:77)\r\n31 libdyld.dylib \t0x000000018b7d9cf8 start + 4\r\n{code}\r\nSo far, we did not find any crashes, but the other one from SDK 8.x was also harder to reproduce, so I'm not sure if that one may cause issues again now. ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-07-30T06:57:46.000+0000", "updated": "2021-07-30T08:49:03.000+0000" }, { "id": "458937", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] Thanks for the log, btw I didn't fully revert Jan's change. Just these two lines:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/iphone/TitaniumKit/TitaniumKit/Sources/API/TiProxy.m#L639\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/iphone/TitaniumKit/TitaniumKit/Sources/API/TiProxy.m#L660", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-07-30T16:39:27.000+0000", "updated": "2021-07-30T16:39:27.000+0000" }, { "id": "458946", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] Curious if you've had chance to test this more, have you been able to reproduce this crash with both Josh's and my patch?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-08-03T23:47:24.000+0000", "updated": "2021-08-03T23:47:24.000+0000" }, { "id": "458948", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I just got feedback from the team and it still crashes, although later than before. Attaching logs asap", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-04T07:15:48.000+0000", "updated": "2021-08-04T07:15:48.000+0000" }, { "id": "458953", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Okay, so the crash looks differently. New logs are attached! *EDIT*: It's the same one as described in AC-6396", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-05T07:26:53.000+0000", "updated": "2021-08-07T16:13:47.000+0000" }, { "id": "459022", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My PR has been merged. I'm thinking we should close this ticket since that PR addresses this ticket's original stack trace.\r\nFor the other crash with a different stack trace, I think that should be a separate ticket.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-08-31T20:03:06.000+0000", "updated": "2021-08-31T20:03:06.000+0000" } ], "maxResults": 62, "total": 62, "startAt": 0 } } }