Description of the problem
When there are few ImageViews in the app, if the image is big, the Emulator crashes with an 'out-of-memory' error. Images in the test is 280KB and is added 5 times to the app.
Steps to reproduce
Use the attached image, and the following code:
var win = Ti.UI.createWindow({
backgroundColor: 'black'
});
function createImageView() {
var iv = Ti.UI.createImageView({
backgroundImage: '/background_main.png'
});
return iv;
}
for (var i=0; i<5; i++) {
win.add(createImageView());
}
win.open();
Note
Running this on Nexus 4 with Android 4.3.3 works fine; same using SDK 3.1.2. Before the crash, the heap size increases up to ~48MB and then the app exits.
[~dcassenti] to confirm: * 3.1.2 + all Android devices => no problem * 3.1.3 + Android 4.2.2 => crash * 3.1.3 + Android 4.3.3 => no problem Is this correct?
I added the two ImageView tickets fixed in 3.1.3. Either of those look like culprits?
Attaching logs coming from Android Emulator 4.2.2 with SDK 3.1.2 vs 3.1.3 The heap grows drastically with 3.1.3, while is fine in 3.1.2
I could not reproduce this on the latest master branch. I tried on a 4.2.2 emulator, and a 4.2.2 device. From the logs, this looks like it is fast dev related. If that is the case, it will not exist in the latest master build since we don't support fastdev with the new Android Build command. Please refer to TIMOB-15519 on the fastdev deprecation status.
Closing ticket as the issue cannot be reproduced and due to the above comments.