Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-7572

Android: V8: Titanium.UI.TabGroup: opening tab group intermittently crashes app

    Details

      Description

      Opening a simple app with a tabgroup crashes 1 times out of 4 in 1.9.0 V8. Does not occur in iOS, 1.9.0 Rhino, or 1.8.1 V8/Rhino. Could not produce in 1.9.0 V8 default app (5 trials).

      Steps to Reproduce:

      1. Run code.

      app.js
      var win = Ti.UI.createWindow({
      	backgroundColor: 'red',
      	fullscreen: false,
      	exitOnClose: true
      });
      
      var button = Ti.UI.createButton({
      	height: 50,
      	title: 'click'
      });
      
      button.addEventListener('click', function(e)
      {
      	var tabGroup = Ti.UI.createTabGroup();
      	
      	var	tabWin = Ti.UI.createWindow({
      			title: 'blue',
      			backgroundColor: 'blue'
      		});
      	
      	var	tabButton = Ti.UI.createButton({
      			title: 'close'
      		});
      	
      	var	tab = Ti.UI.createTab({
      			title: 'blue',
      			window: tabWin
      		});
      
      	tabWin.add(tabButton);
      	
      	tabButton.addEventListener('click', function(e){
      		tabGroup.close();
      	});
      	
      	tabGroup.addTab(tab);	
      	tabGroup.open();
      });
      
      win.add(button);
      win.open();
      

      2. Click 'click' and 'close' 10 times.

      Expected Result:

      No blank screen freezes or immediate crashes, but there may be a null pointer crash after a force close dialog (separate issue).

      Actual Result:

      Crash with debug output usually including the line: committing suicide to free the zombie. Log attached.
      Screen may remain black and console prints empty-window errors on click.

      Note: The sample code without the above test harness still crashes, excerpt below:

      app.js
      var tabGroup = Ti.UI.createTabGroup();
      
      var tabWin = Ti.UI.createWindow({
      		title: 'blue',
      		backgroundColor: 'blue'
      	});
      
      var tabButton = Ti.UI.createButton({
      		title: 'close'
      	});
      
      var tab = Ti.UI.createTab({
      		title: 'blue',
      		window: tabWin
      	});
      
      tabWin.add(tabButton);
      
      tabButton.addEventListener('click', function(e){
      	tabGroup.close();
      });
      
      tabGroup.addTab(tab);	
      tabGroup.open();
      

        Issue Links

          Activity

          Hide
          Dustin Hyde added a comment -

          Closing as Fixed.
          SDK: 1.9.0.v20120213100134
          Android: V8
          Studio: 1.0.8.201201262211
          OS: Lion
          Devices Tested: Android Emulator 2.2, Nexus One 2.2.2, Droid3 2.3.4, Xoom 3.2.1

          Show
          Dustin Hyde added a comment - Closing as Fixed. SDK: 1.9.0.v20120213100134 Android: V8 Studio: 1.0.8.201201262211 OS: Lion Devices Tested: Android Emulator 2.2, Nexus One 2.2.2, Droid3 2.3.4, Xoom 3.2.1
          Hide
          Shameer Jan added a comment -
          Show
          Shameer Jan added a comment - Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5074

            People

            • Assignee:
              Vishal Duggal
              Reporter:
              Dustin Hyde
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development