{ "id": "77417", "key": "TIMOB-4590", "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": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-04-26T08:59:45.000+0000", "created": "2011-07-05T13:58:29.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T19:03:28.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": "If you put a ScrollView in a TableView it crashes when you scroll down and then back up to the ScrollView.\r\n\r\nStep 1: run the code below.\r\nStep 2: scroll down on the table view and then back up\r\nStep 3: notice the app crash\r\n\r\n{code:title=\"app.js\"}\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#000'\r\n});\r\nwin.open();\r\n\r\nvar tableViewRows = [];\r\n\r\nvar scrollView = Titanium.UI.createScrollView({\r\n\tcontentWidth:500,\r\n\tcontentHeight:50,\r\n\ttop:10,\r\n\theight:50,\r\n\twidth:230,\r\n\tborderRadius:10,\r\n\tbackgroundColor:'#13386c'\r\n});\r\n\r\nvar view1 = Ti.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\tborderRadius:20,borderWidth:1,borderColor:'#336699',\r\n\twidth:40,\r\n\theight:40,\r\n\tleft:10\r\n});\r\nscrollView.add(view1);\r\nvar l1 = Ti.UI.createLabel({\r\n\ttext:'1',\r\n\tfont:{fontSize:13},\r\n\tcolor:'#fff',\r\n\twidth:'auto',\r\n\ttextAlign:'center',\r\n\theight:'auto'\r\n});\r\nview1.add(l1);\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\tborderRadius:20,borderWidth:1,borderColor:'#336699',\r\n\twidth:40,\r\n\theight:40,\r\n\tleft:60\r\n});\r\nscrollView.add(view2);\r\nvar l2 = Ti.UI.createLabel({\r\n\ttext:'2',\r\n\tfont:{fontSize:13},\r\n\tcolor:'#fff',\r\n\twidth:'auto',\r\n\ttextAlign:'center',\r\n\theight:'auto'\r\n});\r\nview2.add(l2);\r\n\r\nvar scrollViewRow = Ti.UI.createTableViewRow({\r\n\theight: 'auto',\r\n\tclassName: 'scrollrow'\r\n});\t\r\nscrollViewRow.add(scrollView);\r\ntableViewRows.push(scrollViewRow);\r\n\r\nfor(var i = 0; i < 40; i++)\r\n{\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\ttitle: 'some text',\r\n\t\theight: 'auto',\r\n\t\tclassName: 'row'\r\n\t});\t\r\n\ttableViewRows.push(row);\r\n}\r\n\r\nvar tableView = Titanium.UI.createTableView({\r\n data: tableViewRows\r\n});\r\nwin.add(tableView);\r\n{code}\r\n\r\n{code:title=\"console log\"}\r\nW/dalvikvm( 312): threadid=1: thread exiting with uncaught exception (group=0x4001d800)\r\nE/TiUncaughtHandler( 312): (main) [238,55548] Sending event: exception on thread: main msg:java.lang.IllegalStateException: Ambiguous Z-Order; Titanium 1.7.1,2011/06/21 14:28,293a6d\r\nE/TiUncaughtHandler( 312): java.lang.IllegalStateException: Ambiguous Z-Order\r\n{code}\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-797269", "attachment": [], "flagged": false, "summary": "Android: putting a scrollView in a tableView crashes the app after scrolling", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.7.1\r\nAndroid Emulator 2.2", "comment": { "comments": [ { "id": "184306", "author": { "name": "starbuzz", "key": "starbuzz", "displayName": "Mutasim Karim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This bug is still occuring and can still be reproduced in TiSDK 1.8.1", "updateAuthor": { "name": "starbuzz", "key": "starbuzz", "displayName": "Mutasim Karim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-26T01:15:00.000+0000", "updated": "2012-02-26T01:15:00.000+0000" }, { "id": "195879", "author": { "name": "falk", "key": "falk", "displayName": "MAIRDUMONT GmbH & Co. KG", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I also notice a crash in a very similar scenario with TiSDK 1.8.2 on Nexus S with Android 2.3.6.\r\nYou don't even need to scroll, just follow these steps:\r\nStep 1. Start app.\r\nStep 2. Tap tab 2.\r\nStep 3. Tap tab 1.\r\nStep 4. Notice the app crash.\r\n\r\n*app.js*\r\n{code:title=app.js|borderStyle=solid}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff',\r\n url:'scrollView_in_tableView.js'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code} \r\n\r\nand\r\n\r\n*scrollView_in_tableView.js*\r\n{code:title=scrollView_in_tableView.js|borderStyle=solid}\r\nTitanium.UI.setBackgroundColor('#fff');\r\nvar win = Ti.UI.currentWindow;\r\n\r\nvar data = [{title:\"Row 1\"},{title:\"Row 2\"}];\r\nvar table = Titanium.UI.createTableView({data:data});\r\n\r\nwin.add(table);\r\n\r\nvar row2 = Titanium.UI.createTableViewRow({\r\n\ttouchEnabled: false,\r\n\tbackgroundColor: '#ffffff',\r\n\tbackgroundSelectedColor: '#ffffff', // iOS\r\n\tselectedBackgroundColor: '#ffffff', // Android\r\n\theight:50\r\n});\r\n \r\nvar scrollView = Titanium.UI.createScrollView({\r\n contentWidth:'auto',\r\n contentHeight:'auto',\r\n top:0,\r\n left:0,\r\n height:50,\r\n showVerticalScrollIndicator:false,\r\n showHorizontalScrollIndicator:false,\r\n scrollType: 'horizontal'\r\n});\r\nvar view = Ti.UI.createView({\r\n backgroundColor:'#996633',\r\n width:1000,\r\n height:50,\r\n top:0,\r\n left: 0,\r\n right: 0\r\n});\r\nscrollView.add(view);\r\nrow2.add(scrollView);\r\n\r\ntable.updateRow(1, row2);\r\n{code} ", "updateAuthor": { "name": "falk", "key": "falk", "displayName": "MAIRDUMONT GmbH & Co. KG", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-24T00:37:39.000+0000", "updated": "2012-05-24T00:38:45.000+0000" }, { "id": "197532", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mixing scrollview and tableview should be discouraged in general. In iOS, Apple [advises|https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UIWebView]:\r\n{quote}\r\n*Important* You should not embed UIWebView or UITableView objects in UIScrollView objects. If you do so, unexpected behavior can result because touch events for the two objects can be mixed up and wrongly handled.\r\n{quote}\r\n\r\nPerhaps for similar reasons Android OS has issues and this may be deeper than Titanium.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-06T10:55:09.000+0000", "updated": "2012-06-06T10:55:09.000+0000" }, { "id": "197536", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mixing scrollview and tableviw is strongly discouraged in Titanium for the reason explained in the last comment.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-06T11:07:20.000+0000", "updated": "2012-06-06T12:17:07.000+0000" }, { "id": "197549", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reducing the priority as this usage is discouraged in the documentation.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-06T12:21:57.000+0000", "updated": "2012-06-06T12:21:57.000+0000" }, { "id": "249109", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cannot reproduce\r\n\r\nTested with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0\r\nAndroid Emulator: Android SDK version: 2.2", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-26T08:59:45.000+0000", "updated": "2013-04-26T08:59:45.000+0000" }, { "id": "250964", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with above apps but could not reproduce this issue. \nTested with\nAppcelerator Studio build: 3.1.1.201305072102\nTitanium SDK version: 3.1.0 (GA), 3.1.1.v20130508001914\nAndroid Emulator: Android SDK version: 2.3\nDevice: Samsung Galaxy (v2.3.6)\n\nHence closing this issue.", "updateAuthor": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-09T08:44:15.000+0000", "updated": "2013-05-09T08:44:15.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }