{ "id": "136877", "key": "AC-1452", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-09-24T03:11:10.000+0000", "created": "2014-09-19T11:01:36.000+0000", "labels": [ "crash", "crashes", "memory", "scrollableView", "scrollview" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:53.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": [], "description": "I am adding an array of ScrollViews to the ScrollableView object. The views are passed to the object using the setViews method after they have been created in a loop. The ScrollableView is also clipping to expose pages/views either side of the current page.\r\n\r\nThe ScrollViews for each page contain images that are cropped and blurring applied (native module) and labels and images throughout the page. Each section of elements in the ScrollView are created with controllers.\r\n\r\nAs is, the ScrollableView crashes when the user hits the second-to-last view in an array of 12 and the last view tries to render. Profiling memory allocations via Xcode Instruments shows a 200mb spike on the last view as opposed to 10mb for all of the other views.\r\n\r\nI have tried the following to resolve:\r\n\r\n- remove views not on screen via assigning an array of 3 views at a time, removing all child views and nulling them\r\n- using the removeView and addView methods to add/remove views on and off screen\r\n- removal of content within the scrollviews to reduce load (to test if the complexity of the views was the issue)\r\n- removal of the image cropping and blurring functions (to test if this was causing memory leaks via the native module and functions)\r\n\r\nWhilst these methods remove the children from the views and the TiUIViewProxy count reduces, they do not remove the views from memory.\r\n\r\nLink to test case as too large to upload: https://www.dropbox.com/s/wt3l6z17z48hbz8/ScrollableViewProfiling.zip?dl=0", "attachment": [], "flagged": false, "summary": "ScrollableView crash", "creator": { "name": "trevorfifield", "key": "trevorfifield", "displayName": "Trevor Fifield", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "trevorfifield", "key": "trevorfifield", "displayName": "Trevor Fifield", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.2.3, Alloy 1.3.1", "comment": { "comments": [ { "id": "324868", "author": { "name": "trevorfifield", "key": "trevorfifield", "displayName": "Trevor Fifield", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Removing 3 4mb images from the content in the test case has now stopped the crashing however the issue still remains - child views are still retained in memory when they have been removed using the steps described in the description.\r\n\r\nThis issue will ultimately mean that additional pages added to the ScrollableView will add to the memory stack and it will crash eventually.", "updateAuthor": { "name": "trevorfifield", "key": "trevorfifield", "displayName": "Trevor Fifield", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-22T06:29:35.000+0000", "updated": "2014-09-22T06:29:35.000+0000" }, { "id": "325353", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\nit's likely that if you create a huge scrollview will crash. Please take a look into the infinite scrollview, it might be useful.\r\n\r\nhttps://twitter.com/dawsontoth/status/33296100718809088\r\n\r\nJFYI, iOS 8 is only supported with Mobile SDK 3.4+. I saw that you are developing with 3.2.3, it's not supported anymore. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-24T03:11:10.000+0000", "updated": "2014-09-24T03:11:10.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }