Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24840] Windows: Calling setData on a tableview that already has data errors out

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-06-26T15:15:20.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1
Fix Version/sRelease 6.1.2
ComponentsWindows
Labelsregression
ReporterEwan Harris
AssigneeGary Mathews
Created2017-06-16T15:06:25.000+0000
Updated2017-07-21T13:39:08.000+0000

Description

Description

*This is a regression from 6.0.4.GA to 6.1.0.GA* When calling setData on a tableview that already has data, the app will crash
var win = Ti.UI.createWindow({layout:'vertical'});
var button = Ti.UI.createButton({title:'Add'});
var tableData = [{ title: 'Apples' }, { title: 'Bananas' }, { title: 'Carrots' }, { title: 'Potatoes' }];
var secondData = [{ title: 'Apples' }, { title: 'Bananas' }, { title: 'Carrots' }, { title: 'Potatoes' }];
var table = Ti.UI.createTableView({
    data: tableData
});
button.addEventListener('click', function () {
    table.setData(secondData);
});
win.add(button);
win.add(table);
win.open();

Steps to reproduce

Add the above code to an existing app.js

Build for windows

Click the button

Actual

App crashes

Expected

App should not crash

Comments

  1. Gary Mathews 2017-06-21

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/1019
  2. Ewan Harris 2017-06-26

    FR Passed! Calling setData no longer errors out when the tableview already has data. Test Environment Studio: 4.9.0.201705302345 Appc CLI: 6.2.2 Appc NPM: 4.2.9 Nokia Lumia 550 Windows 10 Mobile emulator 10.0.14393 Windows 10 Pro 10.0.15063
  3. Kota Iguchi 2017-07-11

    6.1.2 backport: https://github.com/appcelerator/titanium_mobile_windows/pull/1038
  4. Ewan Harris 2017-07-14

    6.1.2 backport FR passed and merged
  5. Ewan Harris 2017-07-21

    Verified fix in 6.1.2.v20170720023139. Closing ticket

JSON Source