[TIMOB-9462] Android:Window:modal and exitOnClose properties when used together causes app crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-02-28T11:29:26.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Release 3.0.2 |
Components | Android |
Labels | api, qe-and060112 |
Reporter | Shyam Bhadauria |
Assignee | Shameer Jan |
Created | 2012-06-08T04:46:36.000+0000 |
Updated | 2017-03-17T18:45:49.000+0000 |
Description
It is not a regression.This issue exists as far as 1.8.2.
Refer the code below
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var b = Ti.UI.createButton({
title : "Show Webview",
top : 210
});
b.addEventListener("click", function() {
var win = Ti.UI.createWindow({
title: 'Event Test',
backgroundColor: '#111',
//modal: true,
exitOnClose: true
});
var b1 = Ti.UI.createButton({
title : "Close",
top : 410
});
b1.addEventListener("click", function() {
win.close();
});
var control = Titanium.UI.createWebView({url:'http://www.appcelerator.com'});
win.add(control);
win.add(b1);
win.open();
});
win1.add(b);
win1.open();
Steps to reproduce:
1)Install the app and run it
2)Click 'Show Webview' button
3)Click 'Close' button
Expected results:
1)After step 1,a window should get opened with 'Show Webview' button
2)After step 2,a webview should get opened with 'Close' button.
3)After step 3,the webview should get closed and user should return to initial window of step 1.
Actual result:
1)After step 1,a window gets opened with 'Show Webview' button
2)After step 2,a webview gets opened with 'Close' button.
3)After step 3,the app crashes.
When at least one property,modal or exitOnClose is commented in the above code,it works fine.No crash happens after commenting them out.
The problem cannot reproduce release 3.0.2 and latest master release 3.1.0 Tested on: Titanium Studio, build: 2.1.2.201208301612 Titanium SDK version: 3.1.0 (28/02/2013) Titanium SDK version: 3.0.2 (28/02/2013) Device: Samsung galaxy s duos Android version: 4.0.4
Closing ticket as the issue cannot be reproduced.