-
Notifications
You must be signed in to change notification settings - Fork 363
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
base: master
Are you sure you want to change the base?
Conversation
I can preliminarily verify that this patch resolves the crashes I was seeing from end users. |
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
I'll add my thanks as well. We've been beating our heads against this with no root cause either. |
Not really sure if some of these fixes are logically correct, but I'm pretty sure they will resolve the crashes #462 and #459.