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

Android: Rhino: Titanium.UI.TabGroup: opening and closing new tab group in a cycle crashes app with null pointer exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 2.0.0, Release 1.8.1
    • Component/s: Android
    • Environment:

      SDK: 1.9.0.v20120207124634
      Android: Rhino
      Studio: 1.0.8.201201262211
      OS: Lion
      Devices Tested: Droid3 2.3.4, Android Emulator 2.2, Xoom 3.2.1

      Description

      Opening and closing a new tab group successively crashes app 1 times out of 12.

      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' a dozen times. must click VERY FAST.

      Expected Result:

      No crash.

      Actual Result:

      Crash with null pointer exception. Logs attached.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                dhyde Dustin Hyde
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code