From db2f5bf3b04a7405888a29d4c20f21d950934131 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 15 Aug 2018 14:41:20 -0400 Subject: [PATCH] Add temporary logging around conversation view crashes. --- .../ConversationViewController.m | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 58d602336..d0c12495e 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -3299,6 +3299,9 @@ typedef enum : NSUInteger { return; } + + DDLogInfo(@"%@ uiDatabaseDidUpdate notifications: %@", self.logTag, notifications); + NSArray *sectionChanges = nil; NSArray *rowChanges = nil; [[self.uiDatabaseConnection ext:TSMessageDatabaseViewExtensionName] getSectionChanges:§ionChanges @@ -3397,7 +3400,8 @@ typedef enum : NSUInteger { for (YapDatabaseViewRowChange *rowChange in rowChanges) { switch (rowChange.type) { case YapDatabaseViewChangeDelete: { - DDLogVerbose(@"YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", + DDLogInfo(@"%@ YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", + self.logTag, rowChange.collectionKey, rowChange.indexPath, (unsigned long)rowChange.finalIndex); @@ -3407,7 +3411,8 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeInsert: { - DDLogVerbose(@"YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", + DDLogInfo(@"%@ YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", + self.logTag, rowChange.collectionKey, rowChange.newIndexPath, (unsigned long)rowChange.finalIndex); @@ -3424,8 +3429,9 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeMove: { - DDLogVerbose(@"YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " - @"finalIndex: %lu", + DDLogInfo(@"%@ YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " + @"finalIndex: %lu", + self.logTag, rowChange.collectionKey, rowChange.indexPath, rowChange.newIndexPath, @@ -3434,7 +3440,8 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeUpdate: { - DDLogVerbose(@"YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", + DDLogInfo(@"%@ YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", + self.logTag, rowChange.collectionKey, rowChange.indexPath, (unsigned long)rowChange.finalIndex); @@ -3445,7 +3452,7 @@ typedef enum : NSUInteger { } }; - DDLogVerbose(@"self.viewItems.count: %zd -> %zd", oldViewItemCount, self.viewItems.count); + DDLogInfo(@"%@ viewItems.count: %zd -> %zd", self.logTag, oldViewItemCount, self.viewItems.count); BOOL shouldAnimateUpdates = [self shouldAnimateRowUpdates:rowChanges oldViewItemCount:oldViewItemCount]; void (^batchUpdatesCompletion)(BOOL) = ^(BOOL finished) {