{ "id": "162770", "key": "TIMOB-23810", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-01-09T22:54:02.000+0000", "created": "2016-08-23T22:30:48.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "listview", "run-on-main-thread", "scrollableView" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" }, { "id": "17972", "name": "Release 5.3.1", "archived": false, "released": true, "releaseDate": "2017-02-06" } ], "issuelinks": [ { "id": "53873", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "163272", "key": "TIMOB-23954", "fields": { "summary": "iOS: Events not firing from the child view if created dynamically (using run-on-mainthread)", "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": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-01-13T18:59:45.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": "h5. Problem Description:\r\nCustomer is having an application with multiple views on the top of the screen and a Scrollable view in the bottom with that many views in it.The issue that they are facing here is with receiving 'click' event when the view in the top is clicked and receiving 'scroll' event when the scrollable view is scrolled. Sometimes there is lot of delay in receiving these events and hence effecting the application's responsiveness.\r\n \r\nh5. Steps to re-produce: \r\nDue to complexity of the app neither we nor customer could reproduce the issue at smaller scale.Attaching app provided from customer which would show the skeleton of the app but do not reproduce the issue.\r\n\r\nh5. Expected Behavior:\r\n\r\nApplication should response fast enough when clicking on view on top of the screen or while scrolling the pages.\r\n\r\nh5. Fault Isolation: \r\nAs the ListViews in application has different elements like Label, TextField, Switch.\r\n Removing the ListViews in the Scrollable View and just keep empty views with a Label in it, the screen is responsive.Does ListViews cause memory issues in the screen if they are heavy with different kinds of elements?\r\n\r\nAttaching the skeleton app which customer share with us which will help to understand how different components are used within the app.\r\n", "attachment": [ { "id": "60118", "filename": "appc.rtf", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-08-23T22:22:27.000+0000", "size": 66734, "mimeType": "text/rtf" }, { "id": "61020", "filename": "Bug.zip", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-12-06T23:20:42.000+0000", "size": 10474593, "mimeType": "application/zip" }, { "id": "60116", "filename": "KeyTest.zip", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-08-23T22:25:22.000+0000", "size": 10475488, "mimeType": "application/zip" }, { "id": "60117", "filename": "Simulator_Screen_Shot_Aug_12_2016_11.10.53_AM.png", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-08-23T22:24:36.000+0000", "size": 150349, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Delay in firing click event listener on View when using run-on-main-thread", "creator": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "subtasks": [], "reporter": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.11.6\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 16.0GB\r\n\r\nNode.js\r\n Node.js Version = 4.2.2\r\n npm Version = 2.14.7\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.7\r\n Core Package = 5.4.0\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.9\r\n node-appc Version = 0.2.31\r\n\r\nXcode: 7.3.1\r\niOS SDK: 9.3", "closedSprints": [ { "id": 787, "state": "closed", "name": "2017 Sprint 01 SDK", "startDate": "2016-12-31T02:15:33.446Z", "endDate": "2017-01-14T02:15:00.000Z", "completeDate": "2017-01-15T00:00:19.006Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "402439", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~nmishra] We need a copy of the app that reproduces the problem with click events.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-01T21:43:13.000+0000", "updated": "2016-12-01T21:43:13.000+0000" }, { "id": "404143", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8728\r\n\r\n\r\n{code:java}\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar view = Titanium.UI.createView({\r\n height : 110,\r\n top : 20,\r\n backgroundColor : 'red'\r\n});\r\n\r\nview.addEventListener(\"click\", function(e) {\r\n Ti.API.info('Clicked!');\r\n Ti.API.info(e.source);\r\n});\r\n\r\n\r\nvar labelBGView = Titanium.UI.createView({\r\n backgroundColor : 'black',\r\n height: 100,\r\n width: 200\r\n});\r\n\r\nvar label = Titanium.UI.createLabel({\r\n text : 'Click on the text',\r\n backgroundColor : 'green',\r\n height: 80,\r\n});\r\n\r\n\r\nlabelBGView.add(label);\r\nview.add(labelBGView);\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-05T13:23:30.000+0000", "updated": "2017-01-05T21:35:38.000+0000" }, { "id": "404169", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Second test-case (from TIMOB-23954):\r\n{code:js}\r\nvar index = Ti.UI.createWindow({\r\n layout: \"vertical\",\r\n backgroundColor: \"white\",\r\n});\r\nvar viewContainer = Ti.UI.createView({\r\n layout: \"vertical\",\r\n backgroundColor: \"white\",\r\n});\r\n \r\nindex.add(viewContainer);\r\n \r\n// Should also be triggered by it's childs\r\nindex.addEventListener(\"click\", function(e) {\r\n alert(\"clicked!\");\r\n Ti.API.warn(e.source);\r\n});\r\n \r\nfor (var i = 0; i < 10; i++) {\r\n var view = Ti.UI.createView({\r\n height: 40,\r\n backgroundColor: \"red\"\r\n });\r\n view.add(Ti.UI.createLabel({\r\n text: \"Label \" + i\r\n }));\r\n viewContainer.add(view);\r\n}\r\n \r\nindex.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-05T21:34:16.000+0000", "updated": "2017-01-05T21:34:16.000+0000" }, { "id": "404290", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "I'm facing the same issue, most of my app views is a ScrollableView with bullets and each page has a ListView with templates.\r\n\r\nEven when the ListView is created and the user starts to scroll in it, if he tries to click in a item, it takes some seconds (I prevent this: if he click on multiple items, after that delay, it runs the itemclick event the same number of times that the user clicked on it)\r\n\r\nBut when the ScrollableView and it's ListView's are created if the user wait that delay time, all events works properly.\r\n\r\nProblem: if I'm using a ScrollableView with 2 or 3 pages, each page has a ListView with 4 or more columns, it takes a lot of time to be ready (to handle events), because at this time it's possible to scroll on the ScrollableView and on their ListView's\r\n\r\n\r\nI've 24 templates because I've to cover all the cases for the number of the columns:\r\n\r\n!https://i.stack.imgur.com/hEEKK.png!\r\n!https://i.stack.imgur.com/ZnieY.png!\r\n\r\nIn order to reach this result:\r\n\r\n!https://i.stack.imgur.com/dbpQU.png!\r\n!https://s29.postimg.org/cagj2hp9z/Screen_Shot_2017_01_09_at_15_58_18.png!", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-09T16:04:41.000+0000", "updated": "2017-01-09T16:04:41.000+0000" }, { "id": "404292", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "I've made a sample video: [youtube sample video|https://youtu.be/_Mu-S-y_kjo]\r\n\r\nI've clicked on the several ListView items several times", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-09T16:45:45.000+0000", "updated": "2017-01-09T16:45:45.000+0000" }, { "id": "404311", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR passed, merged.\r\n\r\nAll click events were recognized on the views in the test cases. Also tested toggling main thread and auto layout. No click events failed to fire.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-01-09T22:54:02.000+0000", "updated": "2017-01-09T22:54:02.000+0000" }, { "id": "404346", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "[~ewieber], this change it's available in the nightly builds available today?", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-10T14:42:09.000+0000", "updated": "2017-01-10T14:42:09.000+0000" }, { "id": "404348", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "It is: http://builds.appcelerator.com/mobile/master/mobilesdk-6.1.0.v20170110020513-osx.zip", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-10T14:48:34.000+0000", "updated": "2017-01-10T14:48:34.000+0000" }, { "id": "404352", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "[~hansknoechel] I've downloaded that sdk version this morning, an build the app with it, but the delay is still happening", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-10T15:48:13.000+0000", "updated": "2017-01-10T15:48:13.000+0000" }, { "id": "404391", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "[~hansknoechel] and [~ewieber], I've created a simple app using these 2 elements (ScrollableView and ListView) please take a look at this:\r\n\r\nAfter creating the views, in the 'Try me' button, if you click on the rows and scroll to another page, there is a delay before calling the events, but every thing else is working fine.\r\n\r\nIf there is any other event or function that's called before de delay time is over, it will be called after that delay.\r\n\r\nThe more you click on 'Try me' the more it happens.\r\n\r\n[TIMOB-23810 Test APP|https://www.zipshare.com/download/eyJhcmNoaXZlSWQiOiIwZDUwZTgyZS01NDdkLTQwMjItYTgzZC1lMTg4ZWFhY2U5MjYiLCJlbWFpbCI6InJqY3BlcmVpcmFAb3V0bG9vay5wdCJ9]\r\n\r\nI can't add files to this ticket so I've updated the sample app tho zipshare, without assets", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-10T20:12:59.000+0000", "updated": "2017-01-10T20:13:16.000+0000" }, { "id": "404407", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Ricardo,\r\n\r\nthe test-app cannot be used in it's state. We need a single isolated test-file like used above to test the changes. Your test-case currently also has a lot of unrelated code like database-queries and other UI. \r\n\r\nAre you the original reporter behind this ticket? Because using run-on-main-thread fixed the issue for the initial problem as I read the earlier comments. \r\n\r\nAlso make sure you enabled the main-thread like recommended using {{true}}.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-10T22:41:54.000+0000", "updated": "2017-01-10T22:41:54.000+0000" }, { "id": "404443", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "[~hansknoechel], Thanks again for your time, I'll do some more tests and create a single isolated file, if needed I'll create another ticket", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-11T10:20:18.000+0000", "updated": "2017-01-11T10:20:18.000+0000" }, { "id": "404595", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As reporter will open a new ticket, closing this one.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-13T17:18:11.000+0000", "updated": "2017-01-13T17:18:11.000+0000" }, { "id": "404605", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "body": "[~hansknoechel]: Thanks, It works fine now.", "updateAuthor": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2017-01-13T18:59:45.000+0000", "updated": "2017-01-13T18:59:45.000+0000" } ], "maxResults": 26, "total": 26, "startAt": 0 } } }