[TIMOB-19722] Android: Use the Reveal Effect has NPE
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-10-14T04:29:27.000+0000 |
| Affected Version/s | Release 5.1.0 |
| Fix Version/s | Release 5.1.0, Release 5.2.0 |
| Components | Android |
| Labels | android |
| Reporter | Ashraf Abu |
| Assignee | Ashraf Abu |
| Created | 2015-10-14T03:28:38.000+0000 |
| Updated | 2015-11-20T03:51:39.000+0000 |
Description
[~manuellehner] mentions:
The PR in TIMOB-19579 introduced a bug here https://github.com/appcelerator/titanium_mobile/commit/52808d394be162771f607db916a73f9c44363beb#diff-bec22e2efdd8b352a7754ea42f435dc7R755 as options may be null (see e.g. here ). This results in a NPE
Manuel Lehner's PR: https://github.com/appcelerator/titanium_mobile/pull/7295 that has been merged
Backport 5_1_X: https://github.com/appcelerator/titanium_mobile/pull/7301
-Backport PR waiting for approval first before it can be merged.- Okay to backport.
Backport 5_1_X merged
Verified the fix by using this test code:
Which provides null options & did not see any NPE. Closing. Environment: Appc Studio : 4.4.0.201510290507 Ti SDK : 5.1.0.v20151028143628 , 5.2.0.v20151029134437 Ti CLI : 5.0.5 Alloy : 1.7.18 MAC Yosemite : 10.10.5 Appc NPM : 4.2.1-6 Appc CLI : 5.1.0-38 Node: v0.10.37 Nexus 5 - Android 6.0var window = Ti.UI.createWindow({backgroundColor: "white"}); var view = Ti.UI.createView({}); var view2 = Ti.UI.createView({width: 100, height: 100, backgroundColor: "yellow"}); view.add(view2); var button = Ti.UI.createButton({title: "Hide/show view w/ circular animation"}); button.addEventListener("click", function(e) { if (view.visible) { view.hide(); } else { view.show(); } }); window.add(view); window.add(button); window.open();