Memory Warnings Unload Tabs
If you have a tab group with two active tabs, and a memory warning happens, the inactive tab will "Black Screen of Death".
Sample Code
var tabGroup = Ti.UI.createTabGroup();
tabGroup.addTab(Ti.UI.createTab({
title: '4. Switch to Me',
window: Ti.UI.createWindow({
backgroundColor: 'purple',
title: '1. Look at my BG Color'
})
}));
tabGroup.addTab(Ti.UI.createTab({
title: '2. Switch to Me',
window: Ti.UI.createWindow({
backgroundColor: 'orange',
title: '3. Simulate a Memory Warning'
})
}));
tabGroup.open();
How To Reproduce
Follow the steps on screen in the sample code (1 through 4). Generally, you'll do this:
Look at the purple background color of the first tab.
Click on the second tab.
Simulate a memory warning.
Switch back to the first tab.
Look at the black background -- the tab has been unloaded.
Console Log
2011-05-25 15:05:56.409 PlaygroundMobile[18905:40b] Received simulated memory warning.
[INFO] Due to memory conditions, 0 of 0 image cache entries were unloaded from cache.
Tested On
See environment.
Associated Helpdesk Ticket
http://appc.me/c/APP-241843
Editing the ticket now for additional clarity and reproducibility...
Last remnants of the great Memory Change; Tab groups weren't remembering/forgetting tabs.
THis is still failing in the simulator with Titanium Studio, build: 1.0.0.201105260623, Titanium SDK version: 1.7.X r5e4f9c7e
We were prematurely unloading viewcontrollers.
This issue was reproduced with 1.8 build on iPad 1 running iOS 4.3.5(8L1) version=1.8.0 timestamp=08/19/11 14:25 githash=56b54a2... Attaching Logs Attaching zip of application. To reproduce run many applications to take start taking up memory resources. Run the application and it will show a black screen and the logs show "unloading windows"
Project Attached
Shak, Please follow up with Asim on his further attachments to this issue, validate and open a new bug if necessary.
Reproduced with 1.7.4 release on iPod touch 4g (4.3.3) and iPhone Simulator (5.0) and iPhone4(4.3.2). Not with 1.7.3 release. 1.7.3.mov http://cl.ly/0a2H2R3o1W1G421K3D3v 1.7.4.mov http://cl.ly/3s3y3p3q2F1f19343F1U
This may not be reproducible in 1.8.0.1. Please upgrade your SDK and confirm that the bug is no longer present.
This has been fixed in 1.8.0.1, we have been reluctant to upgrade due to other issues with the 1.8.0.1 release and our app.
Correction: We continue to support 1.7.x release but we do not backport non critical issues to this branch. This particular fix is pretty involved and it would be better to upgrade to 1.8.0.1 release not only to get this fix but also to get many other fixes and enhancements.
closing based on Steve's comments
Closing ticket with reference to the comments above.