Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25728] Android: TableView can crash using setData() #9774

Merged
merged 3 commits into from Feb 20, 2018

Conversation

garymathews
Copy link
Contributor

  • Improve the validation for selectors in setRowData()
TEST CASE
var win = Ti.UI.createWindow({ backgroundColor: 'gray' }),
    data_a = [
        { title: 'Square', backgroundSelectedColor: 'red' },
        { title: 'Circle', backgroundSelectedColor: 'blue' },
        { title: 'Triangle', backgroundSelectedColor: 'purple' }
    ],
    data_b = [
        { title: 'Red', backgroundSelectedColor: 'red' },
        { title: 'Green', backgroundSelectedColor: 'green' },
        { title: 'Blue', backgroundSelectedColor: 'blue' }
    ],
    tv = Ti.UI.createTableView();

tv.data = [];
tv.setData(data_a);
tv.data = [];
tv.setData(data_b);
tv.data = [];
tv.setData(data_a);

win.add(tv);
win.open();

JIRA Ticket

@build
Copy link
Contributor

build commented Jan 26, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

Copy link
Contributor

@sgtcoolguy sgtcoolguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please convert the test case example in your PR comment into an actual mocha test for our suite.

@lokeshchdhry
Copy link
Contributor

FR Passed.

setData on the same data set does not see a crash & this fix seems to have fixed the issue on reporters side as well.

Studio Ver: 5.0.0.201712081732
SDK Ver: 7.1.0 local build
OS Ver: 10.13.2
Xcode Ver: Xcode 9.2
Appc NPM: 4.2.12
Appc CLI: 7.0.2
Daemon Ver: 1.0.1
Ti CLI Ver: 5.0.14
Alloy Ver: 1.11.0
Node Ver: 8.9.1
NPM Ver: 5.5.1
Java Ver: 1.8.0_101
Devices: ⇨ google Nexus 6P --- Android 8.0.0
⇨ google Nexus 5 --- Android 6.0.1

@lokeshchdhry
Copy link
Contributor

@garymathews , can you please resolve the conflicts.

@garymathews
Copy link
Contributor Author

@lokeshchdhry Updated PR

@build build added the android label Feb 20, 2018
@lokeshchdhry lokeshchdhry merged commit 1b75fd8 into tidev:master Feb 20, 2018
@sgtcoolguy sgtcoolguy modified the milestones: 7.2.0, 7.3.0 May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants