[TIMOB-2143] iOS Crash: infinite loop on createButton top with non-integer value
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:13.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | crash, createbutton, defect, infinite, ios, loop, math.floor |
Reporter | Thomas Huelbert |
Assignee | Blain Hamon |
Created | 2011-04-15T03:11:45.000+0000 |
Updated | 2011-04-17T01:58:13.000+0000 |
Description
(bug from David Richey, logged by Thomas Huelbert pending creating of account for David.)
Environment
OS 10.6.4, XCode 4.0, iPhone emulator 4.0 SDK, Titanium Desktop
1.2.1, Titanium Mobile 1.4
Steps to reproduce
The following code works:
var pass = Titanium.UI.createButton({
backgroundImage: 'add3_button_pass.png',
title: 'New',
font: {fontWeight:'bold'},
color: '#white',
top: Math.floor(goalBanner.height * 0.15),
height: Math.floor(goalBanner.height * 0.68),
left: Math.floor(platformWidth * 0.86),
width: Math.floor(platformWidth * 0.13),
zIndex: 10
});
You can make it fail by removing the Math.floor(...) from the top: property, thus:
var pass = Titanium.UI.createButton({
backgroundImage: 'add3_button_pass.png',
title: 'New',
font: {fontWeight:'bold'},
color: '#white',
top: (goalBanner.height * 0.15),
height: Math.floor(goalBanner.height * 0.68),
left: Math.floor(platformWidth * 0.86),
width: Math.floor(platformWidth * 0.13),
zIndex: 10
});
Failure mode:
On Launch from Titanium Developer, app loads and then immediately
crashes. ("Application exited from Simulator")
Crash log:
Attachments
File | Date | Size |
---|---|---|
testb_2010-10-21-104137_mpb15.crash | 2011-04-15T03:11:45.000+0000 | 81085 |