Titanium Mobile
  1. Titanium Mobile
  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 Bug
    • Status: Closed
    • Priority: High 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.

        Issue Links

          Activity

          Hide
          Dustin Hyde added a comment -

          Closing as Duplicate of TIMOB-7572.

          Show
          Dustin Hyde added a comment - Closing as Duplicate of TIMOB-7572 .
          Hide
          Dustin Hyde added a comment -

          Bug occurs in Rhino, not a duplicate.

          Show
          Dustin Hyde added a comment - Bug occurs in Rhino, not a duplicate.
          Hide
          Eric Merriman added a comment -

          Verified fixed with SDK 1.9.0.v20120212011634 on Droid 3.

          Show
          Eric Merriman added a comment - Verified fixed with SDK 1.9.0.v20120212011634 on Droid 3.
          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:
              Hieu Pham
              Reporter:
              Dustin Hyde
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: