{ "id": "62775", "key": "TIMOB-2143", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:13.000+0000", "created": "2011-04-15T03:11:45.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "crash", "createbutton", "defect", "infinite", "ios", "loop", "math.floor" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:13.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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

(bug from David Richey, logged by Thomas Huelbert pending\ncreating of account for David.)

\n

Environment
\nOS 10.6.4, XCode 4.0, iPhone emulator 4.0 SDK, Titanium Desktop\n1.2.1, Titanium Mobile 1.4

\n

Steps to reproduce

\n

The following code works:

\n

var pass = Titanium.UI.createButton({

\n
\n    backgroundImage: 'add3_button_pass.png',\n    title: 'New',\n    font: {fontWeight:'bold'},\n    color: '#white',\n    top:    Math.floor(goalBanner.height * 0.15),\n    height: Math.floor(goalBanner.height * 0.68),\n    left:   Math.floor(platformWidth * 0.86),\n    width:  Math.floor(platformWidth * 0.13),\n    zIndex: 10\n
\n

});

\n

You can make it fail by removing the Math.floor(...) from the\ntop: property, thus:

\n

var pass = Titanium.UI.createButton({

\n
\n    backgroundImage: 'add3_button_pass.png',\n    title: 'New',\n    font: {fontWeight:'bold'},\n    color: '#white',\n    top:    (goalBanner.height * 0.15),\n    height: Math.floor(goalBanner.height * 0.68),\n    left:   Math.floor(platformWidth * 0.86),\n    width:  Math.floor(platformWidth * 0.13),\n    zIndex: 10\n
\n

});

\n

Failure mode:
\nOn Launch from Titanium Developer, app loads and then immediately\ncrashes. (\"Application exited from Simulator\")

\n

Crash log:

{html}", "attachment": [ { "id": "18113", "filename": "testb_2010-10-21-104137_mpb15.crash", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:11:45.000+0000", "size": 81085, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS Crash: infinite loop on createButton top with non-integer value", "creator": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127616", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This bug is blocking the release of the Math Puzzle sample\napp.

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:11:45.000+0000", "updated": "2011-04-15T03:11:45.000+0000" }, { "id": "127617", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Way back in \nhttp://github.com/appcelerator/titanium_mobile/commit/3b55284ca46dd...\n, we made set the frame to be integral. This is what's causing the\ninfinite loop. Is this still valid or should we remove the\ndescendant of this code?

\n

More importantly, the reason we did this was to make everything\nline up. But there may be times when this is not desired, or that\nlining things up causes ugly gaps.

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:11:45.000+0000", "updated": "2011-04-15T03:11:45.000+0000" }, { "id": "127618", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [08dbb2ffc8b541d0d2e15f30aa20ec0018791f0a])\n[#1984 state:fixed-in-qa] [#2143\nstate:fixed-in-qa] [#1838 state:fixed-in-qa] We no longer try to\nenforce buttons onto integer boundaries \nhttp://github.com/appcelerator/titanium_mobile/commit/08dbb2ffc8b54...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:11:46.000+0000", "updated": "2011-04-15T03:11:46.000+0000" }, { "id": "127619", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

iPod 3GT 4.2.1, 1.5.0.a899d42

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:11:46.000+0000", "updated": "2011-04-15T03:11:46.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }