[ALOY-1248] iOS: ListView blank during redraw
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | 3.4.0, TCSupport, iphone, listView |
Reporter | Peter Tippett |
Assignee | Feon Sua Xin Miao |
Created | 2014-10-19T21:48:54.000+0000 |
Updated | 2015-07-14T20:58:55.000+0000 |
Description
Problem Description
After a large model update, find that the listview display only shows what was on displayed, and the rest is blank. The scroll bar shows that I have new records, but is displaying blank lines. If I load a new screen with the same ListView code or flip to another screen and come back, the data display is correct. If I quit and come back in, it is clean and all data is displayed. Is clearly a screen redraw problem I'm having. Have even done a simple code test version, within my App, and still have the same problem. Was working perfectly with 3.3. This same problem is happening in other screens with ListView as well of my App.STEPS TO TEST:
- Create a simple alloy project. - Update project with test code - Link: https://github.com/PeterTippett/ListViewBugTest - Run on iOS device/simulator -List view doesn’t refresh/load data (screenshot 1) but update it’s count value. If we run the project again, then data loads as expected (screenshot 2). But when we refresh/load data again, then a visible section of screen only shows data, others can’t (screenshot 3&4). Screenshot Link: http://oi57.tinypic.com/ve17rp.jpgEXPECTED RESULT:
It’s not working as expected.Extra info
An error appears in Xcode - TiUIListViewProxy.m (marked in x) Thread 1: EXC_BAD_ACCESS(code=1, address=Oxe) TiUIListViewProxy.m Thread 1: EXC_BAD_ACCESS(code=1, address=Oxe) - marked with xxxx
-(void)processUpdateActions
{
UITableView *tableView = self.listView.tableView;
BOOL removeHead = NO;
while (YES) {
void (^block)(UITableView *) = nil;
pthread_mutex_lock(&_operationQueueMutex);
if (removeHead) {
[_operationQueue removeObjectAtIndex:0];
}
if ([_operationQueue count] > 0) {
block = [_operationQueue objectAtIndex:0];
removeHead = YES;
}
pthread_mutex_unlock(&_operationQueueMutex);
if (block != nil) {
[tableView beginUpdates];
block(tableView);
xxxx [tableView endUpdates];
Block_release(block);
} else {
[self.listView updateIndicesForVisibleRows];
[self contentsWillChange];
return;
}
}
}
{quote}
Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-3318.0.1/UITableView.m:1582
{quote}
Have built a version that repeats this and done a clean rebuilt of Titanium as well downloading all the latest versions.
https://github.com/PeterTippett/ListViewBugTest - sample code that fails
Have attached three screen shots, one is before an update.
http://developer.appcelerator.com/question/178522/listview-redraw-after-a-large-model-update#comment-220169
{quote}
[INFO] : Found Titanium plugin id=ti.alloy version=1.0
[INFO] : Deploy type: development
[INFO] : Building for target: simulator
[INFO] : Building using iOS SDK: 8.0
[INFO] : Building for iOS Simulator: iPhone 6
[INFO] : Building for device family: universal
[INFO] : Minimum iOS version: 6.0
{quote}
Attachments
File | Date | Size |
---|---|---|
iOS Simulator Screen Shot 19 Oct 2014 4.09.13 pm.png | 2014-10-19T21:48:54.000+0000 | 167300 |
iOS Simulator Screen Shot 19 Oct 2014 4.09.43 pm.png | 2014-10-19T21:48:54.000+0000 | 130179 |
iOS Simulator Screen Shot 19 Oct 2014 4.09.50 pm.png | 2014-10-19T21:48:54.000+0000 | 116916 |