{ "id": "92408", "key": "TIMOB-9322", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13408", "description": "Sprint 2012-12 API", "name": "Sprint 2012-12 API", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-05T15:52:21.000+0000", "created": "2012-05-25T13:48:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Community", "api", "module_label", "qe-testadded", "regression" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17631", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "88603", "key": "TIMOB-8289", "fields": { "summary": "Android: Adding too many views with views to a window", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-13T16:27:27.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": "This happens when numerous labels are created, one right after another.\r\n\r\nThe following example fails while creates 35 rows each with 25 columns. Notice that several properties for the label are set after the label is created:\r\n\r\n{code:title=Does Not Work|borderStyle=solid}\r\nvar win1 = Ti.UI.currentWindow;\r\nvar BaleReportWindow = Ti.UI.currentWindow;\r\n\r\nvar HScrollView=Ti.UI.createScrollView({backgroundColor:'black',\r\n showVerticalScrollIndicator:false,\r\n showHorizontalScrollIndicator:true,\r\n scrollType:'horizontal'});\r\nvar VScrollView=Ti.UI.createScrollView({backgroundColor:'black',\r\n showVerticalScrollIndicator:true,\r\n showHorizontalScrollIndicator:false,\r\n scrollType:'vertical'});\r\nTi.UI.currentWindow.add(HScrollView);\r\nHScrollView.add(VScrollView);\r\n\r\nvar RowCount=35;\r\nvar ColCount=25;\r\nvar RowHeight=21;\r\nvar ColWidth=50;\r\nvar TheLabel;\r\nvar TheRow;\r\nvar TheCol;\r\n\r\nfor (var Y=1; Y<=RowCount; Y++)\r\n{\r\n TheRow=Ti.UI.createView({top:((Y-1)*RowHeight), \r\n height:RowHeight+1,\r\n backgroundColor:'gray'});\r\n for (var X=1; X<=ColCount; X++)\r\n {\r\n TheLabel=Ti.UI.createLabel({text:Y + '.' + X,\r\n/* \r\n color:'black',\r\n left:1+((X-1)*(ColWidth+1)),\r\n width:ColWidth,\r\n height:RowHeight,\r\n top:1,\r\n */ \r\n backgroundColor:'white'});\r\n/* */ \r\n TheLabel.color='black';\r\n TheLabel.left=1+((X-1)*(ColWidth+1));\r\n TheLabel.width=ColWidth;\r\n TheLabel.height=RowHeight;\r\n TheLabel.top=1;\r\n/* */ \r\n TheRow.add(TheLabel);\r\n }\r\n VScrollView.add(TheRow);\r\n}\r\n\r\n{code} \r\n\r\nIn the following example the same properties are set at creation time, the application does not crash:\r\n\r\n{code:title=Works|borderStyle=solid}\r\nvar win1 = Ti.UI.currentWindow;\r\nvar BaleReportWindow = Ti.UI.currentWindow;\r\n\r\nvar HScrollView=Ti.UI.createScrollView({backgroundColor:'black',\r\n showVerticalScrollIndicator:false,\r\n showHorizontalScrollIndicator:true,\r\n scrollType:'horizontal'});\r\nvar VScrollView=Ti.UI.createScrollView({backgroundColor:'black',\r\n showVerticalScrollIndicator:true,\r\n showHorizontalScrollIndicator:false,\r\n scrollType:'vertical'});\r\nTi.UI.currentWindow.add(HScrollView);\r\nHScrollView.add(VScrollView);\r\n\r\nvar RowCount=35;\r\nvar ColCount=25;\r\nvar RowHeight=21;\r\nvar ColWidth=50;\r\nvar TheLabel;\r\nvar TheRow;\r\nvar TheCol;\r\n\r\nfor (var Y=1; Y<=RowCount; Y++)\r\n{\r\n TheRow=Ti.UI.createView({top:((Y-1)*RowHeight), \r\n height:RowHeight+1,\r\n backgroundColor:'gray'});\r\n for (var X=1; X<=ColCount; X++)\r\n {\r\n TheLabel=Ti.UI.createLabel({text:Y + '.' + X,\r\n/* */\r\n color:'black',\r\n left:1+((X-1)*(ColWidth+1)),\r\n width:ColWidth,\r\n height:RowHeight,\r\n top:1,\r\n/* */ \r\n backgroundColor:'white'});\r\n/* \r\n TheLabel.color='black';\r\n TheLabel.left=1+((X-1)*(ColWidth+1));\r\n TheLabel.width=ColWidth;\r\n TheLabel.height=RowHeight;\r\n TheLabel.top=1;\r\n */ \r\n TheRow.add(TheLabel);\r\n }\r\n VScrollView.add(TheRow);\r\n}\r\n\r\n{code} \r\n\r\nIt is important to note that this does not occur with small amounts of data. For example change the RowCount to 5 and both code examples above work as expected.\r\n\r\nThis appears to be similar to the bug reported in TIMOB-8289 however it somewhat different. \r\n\r\nThis worked when we release with SDK 1.7.? I will continue to test in hopes to find when this problem appeared. \r\n", "attachment": [], "flagged": false, "summary": "Android: Adding Label properties after creation causes the application to crash", "creator": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio: 2.0.1.201204132053 \r\nTitanium SDK: 2.1.0.v20120517130233\r\nAndroid SDK: Google APIs Android 2.3.3\r\nAndroid Runtime: V8\r\n", "comment": { "comments": [ { "id": "197191", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sent [PR #2321|http://github.com/appcelerator/titanium_mobile/pull/2321] to resolve this issue.\r\nThis also appears to fix the test case in TIMOB-8289.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-04T19:27:03.000+0000", "updated": "2012-06-04T19:27:35.000+0000" }, { "id": "197448", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Adding label properties after creation of label work fine and does not crash the application\r\nVerified on:\r\nTitanium Studio: 2.1.0.201206041625\r\nTitanium SDK: 2.1.0.v20120605190238\r\nAndroid SDK: Google APIs Android 2.3.3\r\nAndroid Runtime: v8, Rhino\r\n", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T23:35:09.000+0000", "updated": "2012-06-05T23:35:09.000+0000" }, { "id": "201606", "author": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "body": "Please reopen this bug. Running the first bit of example code above still cause the application to fail with SDK version 2.1.0.GA.\r\n\r\nThank you,\r\n\r\nPete", "updateAuthor": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-05T11:38:45.000+0000", "updated": "2012-07-05T11:38:45.000+0000" }, { "id": "201613", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pete, could you provide us with a log of the crash?", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-05T11:47:41.000+0000", "updated": "2012-07-05T11:47:41.000+0000" }, { "id": "203154", "author": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "body": "Confirmed fixed in 2.1.0.GA", "updateAuthor": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-13T11:09:46.000+0000", "updated": "2012-07-13T11:09:46.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }