Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9672] Android: app crashes when Slider object it's inside a tableViewRow and has the 'value' property

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-26T10:29:33.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-13 API, Release 2.1.1, Release 3.0.0
ComponentsAndroid
LabelsSupportTeam, api, module_slider, qe-testadded, regression
ReporterFederico Casali
AssigneeHieu Pham
Created2012-06-20T16:10:48.000+0000
Updated2012-08-13T13:52:26.000+0000

Description

Problem description

Application crashes when a Slider object is created specifying the 'value' property and it's placed inside a tableViewRow

Steps to reproduce

Run the sample code:
var win1 = Titanium.UI.createWindow({backgroundColor:'#FFFFFF'});

var ds =[];
expandableView = Ti.UI.createView({top:0,height:40,backgroundColor:'yellow'});

var slider = Titanium.UI.createSlider({
    top: 0,
    min: 0,
    max: 100,
    // width: '100%',
    value:50
    });
expandableView.add(slider);


var row1 = Titanium.UI.createTableViewRow({height:100});
row1.add(expandableView);

ds.push(row1);
// 
var tableView = Titanium.UI.createTableView({
			data : ds,
			scrollable : true,
			separatorColor : 'transparent',
			separatorStyle: 'none',
			top:0,
			height:80
	});

var button1 = Ti.UI.createButton({
	title:'show slider value',
	top: 250,
	width:200,
	height:80
});
button1.addEventListener('click', function(){
	alert(slider.value)
});
win1.add(button1);

var button2 = Ti.UI.createButton({
	title:'set slider value to 50',
	height:80,
	width:200,
	bottom:5
});
button2.addEventListener('click', function(){
	slider.value = 50
});
win1.add(button2);


win1.add(tableView);
win1.open();

Further notes:

Comment out the 'value' property and then set it manually (for example, clicking a button). In this case, the value it's correctly stored and displayed. Adding the slider directly to the Window works. Crash only occurs when slider it's added in a tableViewRow. Attached the crash log file too. Escalated as per customer request.

Attachments

FileDateSize
sliderCrash.log2012-06-20T16:10:48.000+00006874

Comments

  1. Josh Roesslein 2012-07-13

    TIMOB-9895 is another report of this bug which is requesting this be back ported to 2.1.1.
  2. Josh Roesslein 2012-07-13

    Created [PR #2563](https://github.com/appcelerator/titanium_mobile/pull/2563) to back port fix into 2_1_X.
  3. Neha Chhabra 2012-07-17

    Environment used for verification - Tested with Titanium SDK: 2.1.1.v20120716180600 Tested with Titanium  Studio: 2.1.1.201207161421 Device - Android Emulator 2.3.3 Machine OS - MAC 10.7.3

JSON Source