Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1248

iOS: ListView blank during redraw

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Titanium SDK version 3.4.0.GA, Max OSX 10.10, Alloy 1.5, Xcode 6.0

    • Story Points:
      13
    • Sprint:
      2015 Sprint 01 SDK, 2015 Sprint 03 SDK, 2015 Sprint 04 Tooling

      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.jpg

      EXPECTED 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;
              }
          }
      }
      

      Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-3318.0.1/UITableView.m:1582

      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

      [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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fmiao Feon Sua Xin Miao
                Reporter:
                Peter Tippett Peter Tippett
              • Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code