Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

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

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-02-14T23:29:05.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.1
Fix Version/sSprint 2012-03, Release 2.0.0, Release 1.8.2
ComponentsAndroid
Labelsmodule_tabgroup, qe-testadded
ReporterDustin Hyde
AssigneeHieu Pham
Created2012-02-07T17:14:02.000+0000
Updated2013-12-10T05:57:32.000+0000

Description

Opening and closing a new tab group successively crashes app 1 times out of 12. Steps to Reproduce: 1. Run Code.
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

FileDateSize
rhino opening and closing tabgroup crashes app.txt2012-02-07T17:14:02.000+000013656
v8 opening and closing tabgroup crashes app.txt2012-02-07T17:14:02.000+000019762

Comments

  1. Dustin Hyde 2012-02-08

    Closing as Duplicate of TIMOB-7572.
  2. Dustin Hyde 2012-02-08

    Bug occurs in Rhino, not a duplicate.
  3. Eric Merriman 2012-02-13

    Verified fixed with SDK 1.9.0.v20120212011634 on Droid 3.
  4. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5074

JSON Source