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

issue-1239-crash occurs when reloading a table node #1251

Closed
wants to merge 4 commits into from

Conversation

Kofktu
Copy link

@Kofktu Kofktu commented Nov 23, 2018

Issue #1239

[issue-1239] Occasionally a crash occurs when reloading a table node

I checked where the crash occurred.

dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);

This was caused by the code continuing to create a standby state.
at the bottom of the function

- (void)updateWithChangeSet:(_ASHierarchyChangeSet *)changeSet {
    ...

    if (_usesSynchronousDataLoading) {
        [self waitUntilAllUpdatesAreProcessed];
    }
}
- (void)_scheduleBlockOnMainSerialQueue:(dispatch_block_t)block
{
  ASDisplayNodeAssertMainThread();
  dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
  [_mainSerialQueue performBlockOnMainThread:block];
}

If _usersSyncDataLoading
The waitUntilAllUpdated function was executed.
We found the same code in it.

So when I removed the code and tested it, there was no problem.
The problem of waiting indefinitely has been solved.

In fact, it is not clear if the code is required to have the updateWithChangeSet: function called, regardless of the _usersSyncousDataLoading value.
Please verify.

@CLAassistant
Copy link

CLAassistant commented Nov 23, 2018

CLA assistant check
All committers have signed the CLA.

@GeekTree0101
Copy link
Contributor

ref: #334

@appleguy
Copy link
Member

Thanks for reporting! I'm fairly sure it is not safe to remove this entirely though, as if there is a queue of multiple edit operations, other aspects of the code can't work safely.

Are you sure your app's data source is handling the difference between presentation & model index paths? The ASTableView / UIKit / presentation index paths may differ from the ASTableNode / Texture / model index paths at any given time. If you call across them without using the index path conversion methods when required, crashes will result.

Your issue could be unrelated to this and may indeed be a framework bug, but I wanted to make sure the two-index-space system is familiar and you feel confident in the app code.

@strangeliu
Copy link
Contributor

ref: #1266

@Kofktu Kofktu closed this Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants