Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9462] Android:Window:modal and exitOnClose properties when used together causes app crash

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-02-28T11:29:26.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsapi, qe-and060112
ReporterShyam Bhadauria
AssigneeShameer Jan
Created2012-06-08T04:46:36.000+0000
Updated2017-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.

Comments

  1. Shameer Jan 2013-02-28

    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
  2. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source