[TIMOB-8340] Drillbit UI.Layout failure
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-19T09:57:54.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-07, Release 2.0.1 |
Components | Android |
Labels | n/a |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2012-03-27T17:01:11.000+0000 |
Updated | 2012-04-19T09:57:54.000+0000 |
Description
Run Drillbit UI.Layout on 3.x device on Rhino a few times. Observe failure
Run this code on 3.x:
// android
var dpi = Ti.Platform.displayCaps.dpi;
if (Ti.Platform.osname === 'android') {
Ti.API.info("should be: " + dpi + ", is " + Ti.UI.convertUnits('1in', Ti.UI.UNIT_PX));
Ti.API.info("shoulde be 100: " + Ti.UI.convertUnits('100', Ti.UI.UNIT_PX));
Ti.API.info("should be: " + dpi + ", is " + Ti.UI.convertUnits('25.4mm',Ti.UI.UNIT_PX));
}
Ti.API.info("should be 25: " + Ti.UI.convertUnits(dpi.toString(), Ti.UI.UNIT_MM));
Ti.API.info("should be 3: " + Ti.UI.convertUnits(dpi.toString(), Ti.UI.UNIT_CM));
Ti.API.info("should be 25: " + Ti.UI.convertUnits(dpi.toString(), Ti.UI.UNIT_MM));
Ti.API.info("should be 3: " + Ti.UI.convertUnits(dpi.toString(), Ti.UI.UNIT_CM));
Ti.API.info("should be 1: " + Ti.UI.convertUnits(dpi.toString(), Ti.UI.UNIT_IN));
Ti.API.info("should be 1000: " + Ti.UI.convertUnits('100cm', Ti.UI.UNIT_MM));
Ti.API.info("should be 254: " + Ti.UI.convertUnits('100in', Ti.UI.UNIT_CM));
Ti.API.info("should be 0: " + Ti.UI.convertUnits('abc', Ti.UI.UNIT_PX));
Observe crash in both v8/Rhino
When running the code above, you need to run from eclipse on a 3.0 device to trigger the restart caused by android bug2373. This will cause the NPE crash as described in the bug.
Tested with 2.0.1.v20120406170211 on LG Slate 3.1 Ran v8/rhino drillbit on version=2.0.1 module_apiversion=2 timestamp=04/09/12 11:28 githash=f64f23f
Reopening bug to update labels. Note to QE: Test already added. Removing qe-port.