Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10338

Android: Opening a new tab group after closing a tab group crashes the application

    Details

      Description

      Problem

      When closing a tab group followed by creating and opening a new tab group, the application crashes.

      Steps to reproduce

      1. The app starts and the first tab group is opened
      2. Click on the button to close the first tab group and create and open another tab group
      3. Application crashes

      Code to reproduce

      var rootWin = Ti.UI.createWindow({
      	backgroundColor : 'pink',
      	exitOnClose : true,
      	navBarHidden : true
      });
       
      rootWin.open();
       
      var tabGroup = Ti.UI.createTabGroup();
       
      var win1 = Ti.UI.createWindow({
      	backgroundColor : 'orange'
      });
       
       
      var aButton = Ti.UI.createButton({
      	title : 'Button',
      	height : Ti.UI.SIZE,
      	width : Ti.UI.SIZE
      });
       
       
      aButton.addEventListener('click', function() {
       
      	tabGroup.close();
      	tabGroup = null;
       
      	var tabGroup2 = Ti.UI.createTabGroup();
       
      	var win21 = Ti.UI.createWindow({
      		backgroundColor : 'orange'
      	});
       
      	var tab21 = Ti.UI.createTab({
      		window : win21
      	});
       
      	tabGroup2.addTab(tab21);
       
      	tabGroup2.open();
      });
       
      win1.add(aButton);
       
      var win2 = Ti.UI.createWindow({
      	backgroundColor : 'lime'
      });
       
      var tab1 = Ti.UI.createTab({
      	window : win1
      });
      var tab2 = Ti.UI.createTab({
      	window : win2
      });
       
      tabGroup.addTab(tab1);
      tabGroup.addTab(tab2);
       
      tabGroup.open();
      
      

      Expected behavior

      First tab group is closed and new tab group is opened.

      Actual behavior

      Application crashes

      Please find attached the crash log.

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              btran Betty Tran
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5650
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration