{ "id": "169668", "key": "TIMOB-25728", "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": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-02-21T19:26:28.000+0000", "created": "2017-08-30T07:51:59.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "SDK", "android", "tableView" ], "versions": [], "issuelinks": [ { "id": "56273", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "170756", "key": "TIMOB-25656", "fields": { "summary": "Android. TiViewProxy.getOrCreateView returns null on Titanium 7.0.0+", "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": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-14T18:13:12.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "I have a tableview in a View XML and it crashes when I set the data via setData on SK6. Works fine on SDK 5, but on SDK6 it crashes on Android when I assign the same data twice which I do when I need to switch data sets. This is only on Android as iOS works as it should\r\n\r\n$.table.setData(myDataSet);\r\n$.table.data = [];\r\n$.table.setData(newDataSet); // This is ok\r\n$.table.data = [];\r\n$.table.setData(anotherNewDataSet); // This is ok\r\n$.table.data = [];\r\n$.table.setData(myDataSet); // Re-assigning myDataSet crashes the app\r\n\r\nI am guessing this is a bug in SDK6 for Android. I've done some further testing and it only crashes if the SAME dataset is assigned twice, I can keep adding new datasets and it won't crash, but assign the same dataset again and it crashes.\r\n\r\nThanks\r\n\r\nNigel", "attachment": [], "flagged": false, "summary": "Android: TableView can crash using setData()", "creator": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX, SDK 6 (all releases)", "closedSprints": [ { "id": 997, "state": "closed", "name": "2018 Sprint 03 SDK", "startDate": "2018-01-28T16:23:12.178Z", "endDate": "2018-02-11T16:23:00.000Z", "completeDate": "2018-02-12T04:22:49.354Z", "originBoardId": 114 }, { "id": 990, "state": "closed", "name": "2018 Sprint 02 SDK", "startDate": "2018-01-14T22:48:43.544Z", "endDate": "2018-01-28T22:48:00.000Z", "completeDate": "2018-01-29T16:22:42.911Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "427507", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~developer@tpglobalpartners.com] I cannot reproduce your issue. Do you have a test case that reproduces this issue?\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'gray'}),\r\n data_a = [{title: 'Square'}, {title: 'Circle'}, {title: 'Triangle'}],\r\n data_b = [{title: 'Red'}, {title: 'Green'}, {title: 'Blue'}],\r\n tv = Ti.UI.createTableView();\r\n\r\ntv.data = [];\r\ntv.setData(data_a);\r\ntv.data = [];\r\ntv.setData(data_b);\r\ntv.data = [];\r\ntv.setData(data_a);\r\n\r\nwin.add(tv);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-01T14:07:19.000+0000", "updated": "2017-09-01T14:07:19.000+0000" }, { "id": "427521", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the update. The data I Aden is based on a complex view containing sub views. I shall be back at work on Monday and will upload an example app that fails. \r\n\r\n", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-01T15:16:19.000+0000", "updated": "2017-09-01T15:16:19.000+0000" }, { "id": "428151", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe have tested this issue with 6.1.2.GA and 6.2.0.GA using the sample code above. We have been unable to reproduce this . [~developer@tpglobalpartners.com] can you please share the test code here to reproduce this on our end?", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-09-20T10:33:11.000+0000", "updated": "2017-09-20T10:33:11.000+0000" }, { "id": "428262", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have been trying to create test code that reproduces the issue which is proving a little difficult. I have however rooted out a cause of the issue so will try and build a test case around this.\r\n\r\nThe cause is around how Android is managing Controller Views in an array thats assigned to a tableview. If in the above example, data_a and data_b are array's of controller views (derived from controller.getView() ), then assigning these again to the tableview causes the issue. However if I recreated the array of controller views each time before reassigning to the tableview, then this seems in the main to resolve the issue, though it still crashes but not so often.\r\n\r\nAs detailed, this is fine on SDK5 on Android and iOS, the issue exists only on SDK 6 with Android so I am doubting its an issue with my coding but more with the memory management within the SDK 6.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-21T16:11:00.000+0000", "updated": "2017-09-21T16:11:00.000+0000" }, { "id": "429308", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, we need a valid sample code that regenerates the issue, so we can move this ticket for a fix. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-10-19T22:24:38.000+0000", "updated": "2017-10-19T22:24:38.000+0000" }, { "id": "429446", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I know I need to get this done - finishing the app off using SDK 5 to meet the project deadlines. I will look to upload some sample code in a weeks time.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-23T19:51:24.000+0000", "updated": "2017-10-23T19:51:24.000+0000" }, { "id": "430466", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~developer@tpglobalpartners.com], did you get around making the sample code? please share with us. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-11-12T19:17:51.000+0000", "updated": "2017-11-12T19:17:51.000+0000" }, { "id": "430518", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I started to make a test app then got diverted onto another SDK 6 issue where by click events defined in an XML view file result in the error\r\n\r\nmessage = \"Can't find variable: <>\";\r\n\r\nLooks like a few SDK errors so will try and get an app that covers bases next week", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-13T17:35:17.000+0000", "updated": "2017-11-13T17:35:17.000+0000" }, { "id": "430577", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": " [~developer@tpglobalpartners.com], We are not clear about the the error \"message = \"Can't find variable: <>\";\". Can you please explain more? We will be waiting for your sample test case.\r\n\r\nThanks", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-14T05:14:56.000+0000", "updated": "2017-11-14T05:14:56.000+0000" }, { "id": "431006", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "\r\nHello [~developer@tpglobalpartners.com],\r\nI just wanted to follow up here. Did you manage to follow the recommended steps provided earlier? Let us know if you still experience any issue. We would be happy to assist you.\r\nBest Regards!", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-20T05:35:44.000+0000", "updated": "2017-11-20T05:35:44.000+0000" }, { "id": "431052", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still have issues and I am finding the final release of SDK5 far more bug free than SDK6. Will try and wrap up all the issues in a single app if possible. Got some tight deadlines for this week and then I can work on replicating the issues in a self contained app", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-20T19:53:10.000+0000", "updated": "2017-11-20T19:53:10.000+0000" }, { "id": "431077", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~developer@tpglobalpartners.com],\r\nThanks for your feedback. Please test on the latest SDK 6.3.0.GA and let us know how it goes. We will be waiting for your sample test code to reproduce the issue on our end.\r\n\r\nBest ", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-21T05:08:58.000+0000", "updated": "2017-11-21T05:08:58.000+0000" }, { "id": "431901", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Try to test on latest SDK 7.0.0.GA. And let us know. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-12-09T20:23:56.000+0000", "updated": "2017-12-09T20:23:56.000+0000" }, { "id": "432232", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So tried this on the latest SDK 7 and its actually worse, so probably means its easier to replicate. Seems that from SDK 6, complex table rows made up of multiple controllers seems to break the tableview - as I said, works fine in SDK5.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-15T19:47:48.000+0000", "updated": "2017-12-15T19:47:48.000+0000" }, { "id": "432237", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~developer@tpglobalpartners.com] Are you able to provide a test case that we can use to debug and fix the issue?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-15T21:09:04.000+0000", "updated": "2017-12-15T21:09:04.000+0000" }, { "id": "432244", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I will try and produce a test case for this and also another one where text is no longer justified in SDK6 and 7.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-16T00:25:55.000+0000", "updated": "2017-12-16T00:25:55.000+0000" }, { "id": "432629", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~developer@tpglobalpartners.com], Did you manage to produce a test case so that we can test on our end?", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-02T11:11:49.000+0000", "updated": "2018-01-02T11:11:49.000+0000" }, { "id": "432794", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "I am encountering the same issue with 7.0.1.GA on an Android 5.0.1 device.\r\nI will try to produce a test case, but have uploaded the console error output: [https://pastebin.com/GF4kRmKG|https://pastebin.com/GF4kRmKG]\r\nIn my application, I have custom table view rows created the \"classic\" way (Ti.UI.createTableViewRow), each with a custom view added. Each row is pushed to a table row array, and then the table data is set with setData().\r\nThe issue arises where the table row array is recreated with new rows, and setData() is called; it is rather finicky as sometimes either no crash occurs, the crash occurs directly upon setting the data, or the table view updates successfully but has to be scrolled down slightly until the border of the bottom row, at which time the crash immediately occurs (presumably as soon as the next row is loaded/rendered).", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-05T21:22:19.000+0000", "updated": "2018-01-05T21:23:06.000+0000" }, { "id": "432808", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This sounds basically the same issue I am having - using an Array and setData. The array contains a custom tableview which is made up of several views.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-06T08:22:21.000+0000", "updated": "2018-01-06T08:22:21.000+0000" }, { "id": "432810", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "Yep, exactly that. I've been unable to construct a test case, however am able to reliably produce the bug in an application I'm working on at the moment. I'll provide updates if I can produce a working test case.", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-06T12:37:45.000+0000", "updated": "2018-01-06T12:37:45.000+0000" }, { "id": "432811", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've just not been able to reproduce a test case - like you, it fails in the app we have. I think this is all linked to memory management as it's fine in SDK5, but fails in SDK6 and its worse in SDK7.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-06T15:07:42.000+0000", "updated": "2018-01-06T15:07:42.000+0000" }, { "id": "432812", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "That certainly makes sense, lots of background SQLite/remote stuff happening in the background here when the issue happens. In my case things work perfectly fine up up to 6.3.0GA; SDK7 is where the trouble starts.", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-06T16:22:23.000+0000", "updated": "2018-01-07T13:13:53.000+0000" }, { "id": "432816", "author": { "name": "findawebguy", "key": "findawebguy", "displayName": "Michael Thornton", "active": true, "timeZone": "America/New_York" }, "body": "I have had the same issue, it seems to be an issue with Android and the UI thread. I have been experiencing a lot of UI thread main exceptions errors in the recent SDKs (TableView FooterView also causes crashes in 7.01 GA on Android). My use case was filtering TableView data. The workaround for me was to create a HTTP call to use as a worker thread, then call the function to setData. This separated the setData from the main UI thread, and voila no more crashes (for now). I have seen post regarding a Ti.Worker module, that also may work in some use cases.\r\n", "updateAuthor": { "name": "findawebguy", "key": "findawebguy", "displayName": "Michael Thornton", "active": true, "timeZone": "America/New_York" }, "created": "2018-01-07T03:54:23.000+0000", "updated": "2018-01-07T03:54:23.000+0000" }, { "id": "432819", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sounds like a good shout Michael on your workaround - not ideal but if it fixes the issue then its good for me. Will give this a go later and post back if this works for me also.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-07T07:07:47.000+0000", "updated": "2018-01-07T07:07:47.000+0000" }, { "id": "432823", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "This sounds promising Michael, I'll give it a shot - if it works then that's definitely better than downgrading the SDK. Will keep the thread posted. Kudos!", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-07T13:09:27.000+0000", "updated": "2018-01-07T13:09:27.000+0000" }, { "id": "432908", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "I've been unable to get the workaround working that Michael suggested, at this point I'm rolling back to 6.3.0GA for Android. When I get a chance I'll try again to produce a test case, but I am able to reproduce the bug every time within a production-ready application.", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-09T13:11:58.000+0000", "updated": "2018-01-09T13:11:58.000+0000" }, { "id": "432946", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~findawebguy], Can you provide the sample code on your suggested workaround? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-10T02:39:23.000+0000", "updated": "2018-01-10T02:39:23.000+0000" }, { "id": "432949", "author": { "name": "findawebguy", "key": "findawebguy", "displayName": "Michael Thornton", "active": true, "timeZone": "America/New_York" }, "body": "Sure. As stated above it only occurs with TableViewRows that contain views, not sure if the complexity of the view is the issue or is the issue the the view was not yet rendered (didn't scroll down far enough yet). In the situation I am having, the app crashes as soon as I attempt to scroll the TableView after the second setData filtering the views (calling applyFilters directly). It errors out with \"Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View org.appcelerator.titanium.view.TiUIView.getOuterView()' on a null object reference; Titanium 7.0.1\"\r\n\r\nThe HTTP worker created seemed to resolve the issue. Here is some quick pseudocode I put together with the HTTP worker.\r\n\r\n+index.js+\r\n\r\nvar data = [];\r\nvar utils = require(\"utils\");\r\n\r\nfunction setFilter(){\r\n //additional application logic is done here based on the arguments sent in\r\n\r\n //applyFilters(); \r\n utils.worker(applyFilters,[]);\r\n\r\n};\r\n\r\nfunction applyFilters()\r\n{\r\n data = [];\r\n $.MyTableView.setData(data);\r\n\r\n //views created and added to data based on filtered results\r\n {\r\n \t..\r\n \t..\r\n \tdata.push(view)\r\n }\r\n\r\n $.MyTableView.setData(data);\r\n}\r\n\r\n+utils.js+\r\n\r\nexports.worker = function(func,params){\r\n var client = Ti.Network.createHTTPClient({\r\n onload: function(e) {\r\n \r\n func.apply(null,params);\r\n \r\n },\r\n onerror: function(e) {\r\n func.apply(null,params);\r\n },\r\n timeout:500 \r\n });\r\n \r\n var url = \"/worker.html\";\r\n client.open(\"GET\", url);\r\n client.send(); \r\n};\r\n\r\n", "updateAuthor": { "name": "findawebguy", "key": "findawebguy", "displayName": "Michael Thornton", "active": true, "timeZone": "America/New_York" }, "created": "2018-01-10T04:02:18.000+0000", "updated": "2018-01-10T04:02:18.000+0000" }, { "id": "433128", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~developer@tpglobalpartners.com], [~jrautenbach], Can you follow up on the [~findawebguy], comment on the workaround suggested above? Try this workaround as provided details above. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-14T02:37:06.000+0000", "updated": "2018-01-14T02:38:03.000+0000" }, { "id": "433331", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "OK so I have tried the worker approach and this has resolve the immediate crashing in that I can populate the tableview. However as per the original issue, if I go to populate the tableview with a second set of data and then re-assign the 1st data set, then the app crashes again.\r\n\r\nCrashes out with the following console warning\r\n\r\n[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4b7c648)", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-19T15:59:39.000+0000", "updated": "2018-01-19T15:59:39.000+0000" }, { "id": "433418", "author": { "name": "findawebguy", "key": "findawebguy", "displayName": "Michael Thornton", "active": true, "timeZone": "America/New_York" }, "body": "I am curious if the problem is setData or setRowData? This could possibly be two different issues. Below is a common error I have in the crash logs under the Google Play Console:\r\n\r\njava.lang.NullPointerException: \r\n at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls (TiTableViewRowProxyItem.java:244)\r\n at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData (TiTableViewRowProxyItem.java:423)\r\n at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData (TiTableViewRowProxyItem.java:86)\r\n at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView (TiTableView.java:254)\r\n at android.widget.AbsListView.obtainView (AbsListView.java:3251)\r\n at android.widget.ListView.makeAndAddView (ListView.java:2147)\r\n at android.widget.ListView.fillUp (ListView.java:803)\r\n at android.widget.ListView.fillGap (ListView.java:740)\r\n at android.widget.AbsListView.trackMotionScroll (AbsListView.java:8319)\r\n at android.widget.ListView.trackMotionScroll (ListView.java:2065)\r\n at android.widget.AbsListView.scrollIfNeeded (AbsListView.java:4923)\r\n....\r\n", "updateAuthor": { "name": "findawebguy", "key": "findawebguy", "displayName": "Michael Thornton", "active": true, "timeZone": "America/New_York" }, "created": "2018-01-20T17:11:39.000+0000", "updated": "2018-01-20T17:11:39.000+0000" }, { "id": "433652", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, [~developer@tpglobalpartners.com], Can you get back on [~findawebguy], comment above?", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-25T08:00:32.000+0000", "updated": "2018-01-25T08:00:32.000+0000" }, { "id": "433655", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "I attempted Michael's workaround but unfortunately it hasn't solved the problem. The crash is per usual, with the same crash log as I posted earlier.\r\nApologies for the late reply.", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-25T09:37:40.000+0000", "updated": "2018-01-25T09:37:40.000+0000" }, { "id": "433715", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After running logcat and viewing the output - issue is certainly with setRowData. \r\n\r\nE/AndroidRuntime( 2711): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 2711): java.lang.NullPointerException\r\nE/AndroidRuntime( 2711): \tat ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:348)\r\nE/AndroidRuntime( 2711): \tat ti.modules.titanium.ui.TableViewRowProxy.setProperty(TableViewRowProxy.java:192)\r\nE/AndroidRuntime( 2711): \tat ti.modules.titanium.ui.TableViewProxy.rowProxyFor(TableViewProxy.java:714)\r\nE/AndroidRuntime( 2711): \tat ti.modules.titanium.ui.TableViewProxy.processData(TableViewProxy.java:629)\r\nE/AndroidRuntime( 2711): \tat ti.modules.titanium.ui.TableViewProxy.handleSetData(TableViewProxy.java:691)\r\nE/AndroidRuntime( 2711): \tat ti.modules.titanium.ui.TableViewProxy.handleMessage(TableViewProxy.java:872)\r\nE/AndroidRuntime( 2711): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/AndroidRuntime( 2711): \tat android.os.Looper.loop(Looper.java:137)\r\nE/AndroidRuntime( 2711): \tat android.app.ActivityThread.main(ActivityThread.java:5103)\r\nE/AndroidRuntime( 2711): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 2711): \tat java.lang.reflect.Method.invoke(Method.java:525)\r\nE/AndroidRuntime( 2711): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)\r\nE/AndroidRuntime( 2711): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)\r\nE/AndroidRuntime( 2711): \tat dalvik.system.NativeStart.main(Native Method)", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-26T16:15:30.000+0000", "updated": "2018-01-26T16:15:30.000+0000" }, { "id": "433718", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~developer@tpglobalpartners.com], Please share the full reproducible sample code/sample project that reproduces the issue for \"setRowData\". I will verify the issue and move to TIMOB for a fix. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-26T16:22:35.000+0000", "updated": "2018-01-26T16:22:35.000+0000" }, { "id": "433720", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As with the others in this thread, it exists in our production ready applications and its difficult to produce a standalone example that fails", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-26T16:26:53.000+0000", "updated": "2018-01-26T16:26:53.000+0000" }, { "id": "433729", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have managed to create a workaround now by using a combination of a worker thread and recreating the table rows every time. \r\n\r\nThis has fixed the issue and it seems that if a row array was reused in setData, then a null exception would occur. If I recreate the row array every time, then calling setData works fine - no NULL exception. I know my coding was fine in SDK5, as the issue came up in SDK6 and in SDK7, the app stopped working completely due to this issue.\r\n\r\nSo for now, I have a workaround that seems to be robust.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-26T17:21:43.000+0000", "updated": "2018-01-26T17:21:43.000+0000" }, { "id": "433733", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9774", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-26T19:10:25.000+0000", "updated": "2018-01-26T19:10:25.000+0000" }, { "id": "433741", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[Here's an SDK build of the above PR|https://www.dropbox.com/s/2pmr9osq3iacxjv/mobilesdk-7.1.0.v20180126114513-osx.zip?dl=1] if anyone would like to give it a try.\r\n\r\nI believe there were two issues causing this crash, TIMOB-25656 and improper validation of the background selectors.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-26T22:01:07.000+0000", "updated": "2018-01-26T22:01:07.000+0000" }, { "id": "433753", "author": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "body": "Hi Gary, I can confirm the PR's solved the issue on my end! Working perfectly.\r\nMany thanks!", "updateAuthor": { "name": "jrautenbach", "key": "jrautenbach", "displayName": "Joseph Rautenbach", "active": true, "timeZone": "Africa/Johannesburg" }, "created": "2018-01-27T12:32:01.000+0000", "updated": "2018-01-27T13:10:43.000+0000" }, { "id": "433767", "author": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Works for me also Gary - thanks for the fix, now I can continue on SDK 7. Many thanks.", "updateAuthor": { "name": "developer@tpglobalpartners.com", "key": "developer@tpglobalpartners.com", "displayName": "Nigel Underwood", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-28T15:11:47.000+0000", "updated": "2018-01-28T15:11:47.000+0000" }, { "id": "434428", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed.\r\nWaiting for merge to be enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-13T19:05:47.000+0000", "updated": "2018-02-13T19:05:47.000+0000" }, { "id": "434550", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9839", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T22:26:41.000+0000", "updated": "2018-02-15T22:26:41.000+0000" }, { "id": "434664", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed for both master & backport.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-20T19:20:05.000+0000", "updated": "2018-02-20T19:20:05.000+0000" }, { "id": "434716", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-21T19:26:22.000+0000", "updated": "2018-02-21T19:26:22.000+0000" }, { "id": "435164", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I HAVE TRIED 7.1.0.RC\r\n\r\nIT USED TO WORK PROPERLY IN THE PAST ...\r\ntableData[2] = tableViewSection3;\r\ntableView.data = tableData;\r\n\r\nHOWEVER, NOW IT ONLY WORKS THIS:\r\ntableView.updateSection(2, tableViewSection3);\r\n\r\n\r\n\r\nfunction createTableViewRow(e) {\r\n\t\r\n\tvar rowView = Titanium.UI.createTableViewRow({\r\n\t\theight:'120dip'\r\n\t});\r\n\t\r\n\trowView.add(Titanium.UI.createLabel({\r\n\t\theight:Ti.UI.SIZE,\r\n\t\tleft:'10dip',\r\n\t\tright:'10dip',\r\n\t\ttext:'Text',\r\n\t\ttextAlign:Titanium.UI.TEXT_ALIGNMENT_LEFT,\r\n\t\tverticalAlign:Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER,\r\n\t\tfont:{fontSize:'20sp', fontWeight:'normal', fontFamily:'Tahoma'},\r\n\t\tcolor:'#000'\r\n\t}));\r\n\t\r\n\treturn(rowView);\r\n}\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar tableData = [];\r\n\r\nvar tableView = Titanium.UI.createTableView({\r\n\tseparatorStyle:Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE\r\n});\r\n\t\r\nvar tableViewSection1 = Ti.UI.createTableViewSection();\r\nvar tableViewSection2 = Ti.UI.createTableViewSection();\r\nvar tableViewSection3 = Ti.UI.createTableViewSection();\r\n\r\ntableData.push(tableViewSection1);\r\ntableData.push(tableViewSection2);\r\ntableData.push(tableViewSection3);\r\n\t\r\ntableView.data = tableData;\r\n\t\r\nwin.add(tableView);\r\n\r\nvar setData = function(e) {\r\n\r\n\ttableViewSection3.add(createTableViewRow());\r\n\ttableViewSection3.add(createTableViewRow());\r\n\ttableViewSection3.add(createTableViewRow());\r\n\t\r\n\t//tableView.updateSection(2, tableViewSection3);\r\n\ttableData[2] = tableViewSection3;\r\n\ttableView.data = tableData;\t\r\n\t\r\n};\r\n\r\nwin.addEventListener('open', function(e) {\r\n\tsetData();\r\n});\r\n\r\nwin.open();\r\n", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-04T16:10:52.000+0000", "updated": "2018-03-04T16:10:52.000+0000" }, { "id": "435597", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.1.0.v20180308150545 & 7.2.0.v20180313125304.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.0.0.201712081732\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.12\r\nAppc CLI: 7.0.2\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.11.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 — Android 6.0.1\r\n⇨ google Nexus 6P — Android 8.0.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-14T18:13:04.000+0000", "updated": "2018-03-14T18:13:04.000+0000" } ], "maxResults": 47, "total": 47, "startAt": 0 } } }