[TIMOB-2014] Scrollable View crashes when lots of views are added
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T03:08:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | defect, ios, ipad, iphone, rplist, scrollable, view |
Reporter | ctredway |
Assignee | Blain Hamon |
Created | 2011-04-15T03:08:07.000+0000 |
Updated | 2017-03-02T21:04:58.000+0000 |
Description
When a large amount of views are added to a scrollable view and scrolling has happened the app crashes. This is on iphone & ipad using 4.1 and 1.4.2.
See this ticket for more info and code:
http://developer.appcelerator.com/helpdesk/view/46321">http://developer.appcelerator.com/helpdesk/view/46321
Attachments
File | Date | Size |
---|---|---|
2010-10-22-124320panic.crash | 2011-04-15T03:08:08.000+0000 | 2155 |
resetcounter.crash | 2011-04-15T03:08:08.000+0000 | 167 |
About how many views would you consider "a large amount"?
50+
Appears to have been fixed by Blain's #2003, the image view memory panic issue. No doubt caused by the fact that a large number of images were being loaded locally.
Note, the problem might persist for images which were cached from a remote source!
Whoops, gonna mark this fixed-in-qa for Thom to test and see if it was fixed by #2003.
With today nightly it is still crashing. In my sample I cache just 3 pictures and change them three by three.
This bugfix is currently in our master branch. It is not folded into the nightly builds until the fix is approved, which should happen sometime this week. If you need the fix before then, you may develop off of our (potentially unstable) master branch: http://github.com/appcelerator/titanium_mobile/tarball/master">http://github.com/appcelerator/titanium_mobile/tarball/master
tried with github - it crashes, but it took more time to crash.
We will be able to respond to this ticket faster if you post a crash log.
This is all I have in ~/Library/Logs/CrashReporter/MobileDevice/my_device. Is there else I should look?
That's the only place you should need to look to find crash logs. Unfortunately neither of these are very helpful; this is probably a memory panic issue.
As long as you are keeping your image views attached to a window and not explicitly deleting them, the images that they use will continue to take up memory. Using so many image views all at once without loading/unloading them on demand is going to cause memory problems. iOS will not unload these images from memory if they are still in use somewhere and this will lead to memory panics and crashes.
Titanium does require better memory management, but there is nothing we can do about excessive use of memory which is related to views that are not cleaned up.
Marking invalid.
Note that although this bug is marked invalid, better memory management for scrollable view may become a feature available in the future. Depends on whether or not we can support dynamic load/unload of contents of scrollable view frames. See bug #2193.
Closed as invalid.