Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17172] iOS: Crash with TableViewRow object to a TableView inside a ScrollView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-06-19T19:45:20.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.3.0, Release 3.4.0
ComponentsiOS
Labelsios, module_scrollView, parity, qe-testadded, regression
ReporterDirlei Dionísio
AssigneeVishal Duggal
Created2014-06-14T15:16:55.000+0000
Updated2014-06-20T19:12:11.000+0000

Description

I have a UI design with: ScrollView with layout='vertical', a view at height=Ti.UI.SIZE and a TableView at height=Ti.UI.SIZE and scrollable=false. When I try to add a TableViewRow object to TableView, the app closes. This code reproduces the problem.
var w = Titanium.UI.createWindow({
	fullscreen: true,
	backgroundColor: 'silver'
});

var s = Ti.UI.createScrollView({
	layout: 'vertical' /* composite crash too */
});

var v = Ti.UI.createView({
	height: Ti.UI.SIZE /* Ti.UI.FILL works */
});

var t = Ti.UI.createTableView({
	data: [{title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}, {title: '1'}],
	height: Ti.UI.SIZE,
	//backgroundColor: 'white',
	top: '200dp',
	scrollable: false
});

v.add(t);
s.add(v);
w.add(s);

setTimeout(function () {
	t.backgroundColor = 'yellow';

	t.setData([{
		title: 'dictionaty works'
	}]);
	
	t.appendRow({
		title: 'it will appears only later'
	});

	setTimeout(function () {
		t.backgroundColor = 'red';
		
		t.setData([Ti.UI.createTableViewRow({
			title: 'app will close'
		})]);
		
		alert('not called');
	}, 2000);
}, 2000);

w.open();

Comments

  1. Shuo Liang 2014-06-16

    HI, What is your meaning of "App closes", app exist to home page? maybe you can give me a screen shot for your problem. Regards, Shuo Liang
  2. Dirlei Dionísio 2014-06-16

    Exactly, the app exit to home. Note that if I change line 11 to Ti.UI.FILL, all stuff works. I suppose the bug is on Ti.UI.View resize implementation. Regards, Dirlei.
  3. Ingo Muschenetz 2014-06-16

    Removing regression tag unless noted otherwise.
  4. Dirlei Dionísio 2014-06-16

    Ingo, on Ti 3.2.3 the code above works perfectly. Thus, this is a regression issue, right?
  5. Ingo Muschenetz 2014-06-16

    Yes, if it does work on 3.2.3, then I will mark it as a regression.
  6. Federico Casali 2014-06-16

    Confirmed being not reproducible using TiSDK 3.2.3.GA Therefore is a regression. TiSDk 3.3.0.v20140613161751 Appcelerator Studio 3.3.0.201406111952 CLI 3.3.0-rc Alloy 1.4.0-rc
  7. Vishal Duggal 2014-06-18

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/5815 3_3_X - https://github.com/appcelerator/titanium_mobile/pull/5816 Note: The size behavior of TableView seems to be broken but that should not be considered a blocker for this PR. The behavior is broken in 3.2.3.GA as well
  8. Samuel Dowse 2014-06-19

    Verified fixed on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201406171619 Titanium SDK, build: 3.3.0.v20140619130123 Titanium CLI, build: 3.3.0-rc Alloy: 1.4.0-rc iOS Device: iPhone 5S (7.1.1) iOS Simulator: iPhone (7.1) Used test code provided in description, app does not crash. Closing.

JSON Source