{ "id": "62275", "key": "TIMOB-1643", "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": "11239", "name": "Release 1.6.0 M06", "archived": true, "released": true, "releaseDate": "2011-01-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:45.000+0000", "created": "2011-04-15T02:58:09.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "release-1.6.0", "scrollview" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56: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": "{html}
Ok, if a scrollview is placed in a window and more than 10 child\nviews are added, any new children views added cause the app to\nfreeze.
\nAnother scenario is that if the window is opened before child\nviews are added to the scroll view, only 10 views can be added\nwithout causing a freeze. The code below demonstrates this.
\nvar win = Ti.UI.currentWindow;
\nvar scrollView = Titanium.UI.createScrollView({
\nborderSize: 1, borderColor: 'blue', maxZoomScale: 1, minZoomScale:\n1, contentHeight: 'auto' }); win.add(scrollView);
// Load fisrt page for (var i=0; i<50; i++) {
\nscrollView.add(Titanium.UI.createView({
\n left: (i % 4) * 70,\n top: parseInt(i / 4) * 70,\n width: 64,\n height: 64,\n backgroundColor: '#ccc'
\n
\n})); }
\nalert('Application is NOT freezed');
\nwin.open();
\nsetTimeout(function(){
\nwin.remove(scrollView);
\n
\n},1000);
\nsetTimeout(function(){
\nalert('Application is NOT freezed');\n\nvar scrollView2 = Titanium.UI.createScrollView({\n borderSize: 1,\n borderColor: 'blue',\n maxZoomScale: 1,\n minZoomScale: 1,\n contentHeight: 'auto'\n});\nwin.add(scrollView2);\n\nfor (var i=0; i<50; i++) {\n scrollView2.add(Titanium.UI.createView({\n left: (i % 4) * 70,\n top: parseInt(i / 4) * 70,\n width: 64,\n height: 64,\n backgroundColor: '#000'\n }));\n};
\n
\n},3000)
\nrun on the iphone, iOS 4.0.2 Ti SDK 1.4
(from [72d5c4fd14db55459aea52d39f1f69818642f054])\n[#1643 state:fixed-in-qa] Expensive but\nnecessary, we can't recursively lock children, not even for\nreading. \nhttps://github.com/appcelerator/titanium_mobile/commit/72d5c4fd14db...
Tested the code provided on iPhone Simulator (4.2) and iPhone 4\n(4.2.1)
\nWorks as expected
\nTi SDK 1.6 (Jan 26 2011 16:47 rb481fe0b)
\nTi. Dev. 1.3
I am getting a similar issue with a scrollview - the app doesn't\nfreeze so much as the scrollview just doesn't display.
\nThe bug doesn't appear on simulator, iphone 4 but it happens on\niphone 3g.
Is this issue outstanding still? and has it been tested on\niphone 3g? Are there any workarounds for the time being?
\nmuch appreciated,
\nAnthony
My usecase:
\nScrollview has 4 children.
\nScrollview has fixed height and width with contentWidth and\ncontentHeight on auto.
\nThe 4 children are variable heights that get added to a holder view\nwhich has height:'auto' and layout'vertical'.
\nThis is then added to the scrollView.