Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10400] Android: Crash when trying to close a window twice

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-08-14T13:41:41.000+0000
Affected Version/sRelease 2.0.2, Release 2.1.0, Release 2.1.1
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterMauro Parra-Miranda
AssigneePing Wang
Created2012-08-10T14:13:21.000+0000
Updated2017-03-09T23:33:50.000+0000

Description

Problem Description

When you are trying to close a window twice, the app will crash.

Actual results

The is crashing

Expected Results

The app should complain in the logs, but not crash.

Test Code

1. Create new mobile project 2. Add this code to the app.js.
var win1 = Ti.UI.createWindow({backgroundColor:'white'});
var win2 = win1; 
win1.open();
if(win1){ win1.close();}
setTimeout(win2.close(),5000); 

Comments

  1. Ping Wang 2012-08-14

    The test code is not correct. Please use the code below and no crash any more:
       var win1 = Ti.UI.createWindow({backgroundColor:'white'});
       var win2 = win1; 
       win1.open();
       if(win1){ win1.close();}
       setTimeout(function(){win2.close();},5000);
       
    Mark the ticket as invalid.
  2. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source