Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13903] iOS: Reading TableView's "sectionCount" property crashes app

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-10-28T17:25:59.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0, Release 3.2.0
Fix Version/sRelease 9.3.0, Release 9.2.2
ComponentsiOS
LabelsTableView, ios, section
ReporterMatej
AssigneeJoshua Quick
Created2013-05-17T09:17:33.000+0000
Updated2020-10-28T17:26:00.000+0000

Description

*Summary:* Reading a TableView's sectionCount property causes the app to crash. *Steps to reproduce:*

Build and run the below on iOS.

Notice the app crashes. No error dialog appears.

var tableView = Ti.UI.createTableView({
	data: [{ title: 'Row 1' }],
});
console.log('@@@ sectionCount: ' + tableView.sectionCount);
*Work-Around:* Fetch the sections array and read its length property.
console.log('@@@ sectionCount: ' + tableView.sections.length);

Comments

  1. Daniel Sefton 2013-05-17

    Tested and confirmed on iOS 6 simulator, Ti SDK 3.0.2, 3.1 GA and 3.2 CI.
  2. Alexander Maiburg 2014-02-28

    Any news on this issue. Would like to have it resolved... Thanks, Alex
  3. Joshua Quick 2020-10-20

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12193
  4. Sohail Saddique 2020-10-21

    FR Passed. PR merged.
  5. Lokesh Choudhary 2020-10-28

    Verified the fix with SDK 9.2.2.v20201026120850. Closing.

JSON Source