{ "id": "102649", "key": "TIMOB-11502", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14169", "description": "2012 Sprint 22 Core", "name": "2012 Sprint 22 Core", "archived": true, "released": true, "releaseDate": "2012-11-05" }, { "id": "14274", "description": "2012 Sprint 22", "name": "2012 Sprint 22", "archived": true, "released": true, "releaseDate": "2012-11-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-30T17:22:35.000+0000", "created": "2012-10-04T11:08:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Android", "TableView", "TableViewSection", "core", "module_tableview", "notable", "qe-review", "qe-testadded", "triage" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-12-20T00:09:55.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": "h2. Problem\r\nI have a fairly simple TableView in my app which crashes only when compiled with SDK 2.1.3. Inside the DDMS log attached you can find the exception thrown. The cause of the crash seems to be the headerView of the TableViewSection. Using the following test case the app crashes in the Android Emulators 4.0.3 and 4.1 on both WVGA800 and WXGA720 screen, but inside my app this code crashes only when ran on the WXGA720 screen.\r\n\r\nh2. Test case\r\n{code:javascript}\r\nvar self = Ti.UI.createWindow({\r\n\t\tbackgroundColor: \"#ffffff\",\r\n\t\ttabBarHidden: true\r\n\t});\r\n\r\nvar tableViewData = [];\r\n\t\r\nvar tableView = Ti.UI.createTableView({\r\n\tstyle:Titanium.UI.iPhone.TableViewStyle.GROUPED,\r\n});\r\n\r\nself.add(tableView);\r\n\r\nvar headerView = Ti.UI.createView({\r\n\theight: 90,\r\n\tborderColor: 'transparent',\r\n\tborderWidth: 0,\r\n});\r\n\r\nvar headerImageContainer = Ti.UI.createView({\r\n\tleft: 19,\r\n\theight: 64,\r\n\twidth: 64\r\n});\r\n\t\r\nheaderImageContainer.add(Ti.UI.createView({\r\n\tbackgroundImage: '/images/person.png',\r\n\twidth: 64,\r\n\theight: 64,\r\n\tborderColor: '#a9a9a9',\r\n\tborderRadius: 4,\r\n\tborderWidth: 1,\r\n\t\r\n}));\r\n\r\nheaderView.add(headerImageContainer);\r\n\r\ntableViewData.push(Ti.UI.createTableViewSection({\r\n\theaderView: headerView,\r\n}));\r\n\r\ntableView.data = tableViewData;\r\n\r\nself.add(tableView);\r\n\r\nself.open();\r\n{code}", "attachment": [ { "id": "32281", "filename": "crash log.txt", "author": { "name": "lucassp", "key": "lucassp", "displayName": "Lucian Pacurar", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2012-10-04T11:08:02.000+0000", "size": 10176, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: TableView - Application crashes when adding a TableViewSection with headerView", "creator": { "name": "lucassp", "key": "lucassp", "displayName": "Lucian Pacurar", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "lucassp", "key": "lucassp", "displayName": "Lucian Pacurar", "active": true, "timeZone": "Europe/Helsinki" }, "environment": "Titanium SDK version: 2.1.3 (10/02/12 16:16 15997d0)\r\nJavascript Engine: V8\r\nPlatform & version: Android 4.0.3, Android 4.1\r\nDevice Details: Android emulator x86/ARM, Galaxy S\r\nHost Operating System: OS X 10.8\r\nTitanium Studio version: 2.1.2.201208301612", "comment": { "comments": [ { "id": "223871", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When these two lines of Javascript code are removed, there is no failure:\n\n borderColor: 'transparent',\n borderWidth: 0,\n\n\nThis is the first place I see a problem:\n\nThread [<1> main] (Suspended (exception IllegalStateException))\t\n\t\t\n\tListView.layoutChildren() line: 1662\t\n\tListView(AbsListView).onLayout(boolean, int, int, int, int) line: 1147\t\n\tListView(View).layout(int, int, int, int) line: 7035\t\n\tTiTableView(FrameLayout).onLayout(boolean, int, int, int, int) line: 333\t\n\tTiTableView.onLayout(boolean, int, int, int, int) line: 555\t\n\tTiTableView(View).layout(int, int, int, int) line: 7035\t\n\tTiCompositeLayout.onLayout(boolean, int, int, int, int) line: 583\t\n\tTiCompositeLayout(View).layout(int, int, int, int) line: 7035\t\n\tTiCompositeLayout.onLayout(boolean, int, int, int, int) line: 583\t\n\tTiCompositeLayout(View).layout(int, int, int, int) line: 7035\t\n\tFrameLayout.onLayout(boolean, int, int, int, int) line: 333\t\n\tFrameLayout(View).layout(int, int, int, int) line: 7035\t\n\tLinearLayout.setChildFrame(View, int, int, int, int) line: 1249\t\n\tLinearLayout.layoutVertical() line: 1125\t\n\tLinearLayout.onLayout(boolean, int, int, int, int) line: 1042\t\n\tLinearLayout(View).layout(int, int, int, int) line: 7035\t\n\tPhoneWindow$DecorView(FrameLayout).onLayout(boolean, int, int, int, int) line: 333\t\n\tPhoneWindow$DecorView(View).layout(int, int, int, int) line: 7035\t\n\tViewRoot.performTraversals() line: 1045\t\n\tViewRoot.handleMessage(Message) line: 1727\t\n\tViewRoot(Handler).dispatchMessage(Message) line: 99\t\n\tLooper.loop() line: 123\t\n\tActivityThread.main(String[]) line: 4627\t\n\tMethod.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]\t\n\tMethod.invoke(Object, Object...) line: 521\t\n\tZygoteInit$MethodAndArgsCaller.run() line: 868\t\n\tZygoteInit.main(String[]) line: 626\t\n\tNativeStart.main(String[]) line: not available [native method]\t\n", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-16T21:07:52.000+0000", "updated": "2012-10-16T21:07:52.000+0000" }, { "id": "224095", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Someone in the Core Team needs to look at this ticket", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-17T22:24:52.000+0000", "updated": "2012-10-17T22:24:52.000+0000" }, { "id": "225036", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated test case:\n\n{code}\nvar self = Ti.UI.createWindow({\n\tbackgroundColor : \"#ffffff\",\n\ttabBarHidden : true\n});\n\nvar tableViewData = [];\n\nvar tableView = Ti.UI.createTableView({\n\t// style:Titanium.UI.iPhone.TableViewStyle.GROUPED,\n});\n\nself.add(tableView);\n\nvar headerView = Ti.UI.createView({\n\theight : 90,\n\tborderColor : 'green',\n\tborderWidth : 5,\n\tbackgroundColor : 'red'\n});\n\nvar headerImageContainer = Ti.UI.createView({\n\tleft : 19,\n\theight : 64,\n\twidth : 64,\n\tbackgroundColor : 'blue'\n});\n\nheaderImageContainer.add(Ti.UI.createView({\n\tbackgroundColor : 'yellow',\n\twidth : 64,\n\theight : 64,\n\tborderColor : '#a9a9a9',\n\tborderRadius : 4,\n\tborderWidth : 1,\n}));\n\nheaderView.add(headerImageContainer);\n\ntableViewData.push(Ti.UI.createTableViewSection({\n\theaderView : headerView,\n}));\n\ntableView.data = tableViewData;\n\nself.add(tableView);\n\nself.open();\n{code}\n\nExpected Results:\nThere should be a red view with a green border for the row. Inside the red view, there is a yellow view.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T01:48:35.000+0000", "updated": "2012-10-26T01:48:35.000+0000" }, { "id": "225037", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Ready: https://github.com/appcelerator/titanium_mobile/pull/3333", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T01:53:34.000+0000", "updated": "2012-10-26T01:53:34.000+0000" }, { "id": "228317", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_0_X PR https://github.com/appcelerator/titanium_mobile/pull/3468", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-21T23:19:16.000+0000", "updated": "2012-11-21T23:19:16.000+0000" }, { "id": "229863", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested on: \r\nTitanium Studio, build: 3.0.0.201211301903\r\nTitanium SDK, builds: 3.0.0.v20121130200208; 3.1.0.v20121203181001\r\nDevices: Samsung Galaxy S III (4.0.4)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T18:19:10.000+0000", "updated": "2012-12-04T18:19:10.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }