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

Add nil checks for #462 and #459 #463

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chrisballinger
Copy link
Contributor

Not really sure if some of these fixes are logically correct, but I'm pretty sure they will resolve the crashes #462 and #459.

@chrisballinger
Copy link
Contributor Author

I can preliminarily verify that this patch resolves the crashes I was seeing from end users.

Copy link

@michaelkirk-signal michaelkirk-signal left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

collectionKey.collection, collectionKey.key, object,
another.collection, another.key, anotherObject);

if (object && anotherObject) {

Choose a reason for hiding this comment

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

Indentation seems off in all these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops

@@ -1308,6 +1308,13 @@ - (void)insertRowid:(int64_t)rowid collectionKey:(YapCollectionKey *)collectionK

NSString *pageKey = pageMetadata->pageKey;
YapDatabaseViewPage *page = [self pageForPageKey:pageKey];

NSAssert(page != nil, @"Missing page in group(%@)", group);

Choose a reason for hiding this comment

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

Any idea what can lead to this?

FWIW we've seen similar crashes, but haven't root-caused it.

Hopefully this assert/logging will help track it down...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, I've never caught it live, only from crash logs

@mdescalzo
Copy link

I'll add my thanks as well. We've been beating our heads against this with no root cause either.

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.

3 participants