From 420f5f88ff8e3033e5973d1b088902e9f2c5d502 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 15 Aug 2018 17:50:36 -0400 Subject: [PATCH 1/7] Add logging, error checking and recovery around corrupt message mappings. --- .../ConversationViewController.m | 95 +++++++++++++------ 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 1431fe65d..58d602336 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -455,29 +455,11 @@ typedef enum : NSUInteger { [self ensureDynamicInteractions]; [[OWSPrimaryStorage sharedManager] updateUIDatabaseConnectionToLatest]; - if (thread.uniqueId.length > 0) { - self.messageMappings = [[YapDatabaseViewMappings alloc] initWithGroups:@[ thread.uniqueId ] - view:TSMessageDatabaseViewExtensionName]; - } else { - OWSFail(@"uniqueId unexpectedly empty for thread: %@", thread); - self.messageMappings = - [[YapDatabaseViewMappings alloc] initWithGroups:@[] view:TSMessageDatabaseViewExtensionName]; - return; + [self createNewMessageMappings]; + if (![self reloadViewItems]) { + OWSFail(@"%@ failed to reload view items in configureForThread.", self.logTag); } - // Cells' appearance can depend on adjacent cells in both directions. - [self.messageMappings setCellDrawingDependencyOffsets:[NSSet setWithArray:@[ - @(-1), - @(+1), - ]] - forGroup:self.thread.uniqueId]; - - // We need to impose the range restrictions on the mappings immediately to avoid - // doing a great deal of unnecessary work and causing a perf hotspot. - [self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) { - [self.messageMappings updateWithTransaction:transaction]; - }]; - [self updateMessageMappingRangeOptions]; [self updateShouldObserveDBModifications]; self.reloadTimer = [NSTimer weakScheduledTimerWithTimeInterval:1.f @@ -814,7 +796,9 @@ typedef enum : NSUInteger { // Avoid layout corrupt issues and out-of-date message subtitles. self.lastReloadDate = [NSDate new]; self.collapseCutoffDate = [NSDate new]; - [self reloadViewItems]; + if (![self reloadViewItems]) { + OWSFail(@"%@ failed to reload view items in resetContentAndLayout.", self.logTag); + } [self.collectionView.collectionViewLayout invalidateLayout]; [self.collectionView reloadData]; } @@ -1771,7 +1755,6 @@ typedef enum : NSUInteger { [self.messageMappings setRangeOptions:rangeOptions forGroup:self.thread.uniqueId]; [self updateShowLoadMoreHeader]; self.collapseCutoffDate = [NSDate new]; - [self reloadViewItems]; } #pragma mark Bubble User Actions @@ -3241,7 +3224,7 @@ typedef enum : NSUInteger { { OWSAssertIsOnMainThread(); - DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); if (self.shouldObserveDBModifications) { // External database modifications can't be converted into incremental updates, @@ -3250,12 +3233,14 @@ typedef enum : NSUInteger { // // We don't need to do this if we're not observing db modifications since we'll // do it when we resume. - [self resetMappings]; + [self hardResetMappings]; } } - (void)uiDatabaseWillUpdate:(NSNotification *)notification { + DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + // HACK to work around radar #28167779 // "UICollectionView performBatchUpdates can trigger a crash if the collection view is flagged for layout" // more: https://github.com/PSPDFKit-labs/radar.apple.com/tree/master/28167779%20-%20CollectionViewBatchingIssue @@ -3265,14 +3250,17 @@ typedef enum : NSUInteger { // We want to relayout our contents using the old message mappings and // view items before they are updated. [self.collectionView layoutIfNeeded]; - // ENDHACK to work around radar #28167779 + // ENDHACK to work around radar #28167779) } - (void)uiDatabaseDidUpdate:(NSNotification *)notification { OWSAssertIsOnMainThread(); + DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + if (!self.shouldObserveDBModifications) { + DDLogInfo(@"%@ %s ignoring", self.logTag, __PRETTY_FUNCTION__); return; } @@ -3378,14 +3366,21 @@ typedef enum : NSUInteger { // These errors seems to be very rare; they can only be reproduced // using the more extreme actions in the debug UI. OWSFail(@"%@ hasMalformedRowChange", self.logTag); - [self resetContentAndLayout]; + [self hardResetMappings]; [self updateLastVisibleTimestamp]; [self scrollToBottomAnimated:NO]; return; } NSUInteger oldViewItemCount = self.viewItems.count; - [self reloadViewItems]; + if (![self reloadViewItems]) { + // These errors are rare. + OWSFail(@"%@ could not reload view items; hard resetting message mappings.", self.logTag); + [self hardResetMappings]; + [self updateLastVisibleTimestamp]; + [self scrollToBottomAnimated:NO]; + return; + } BOOL wasAtBottom = [self isScrolledToBottom]; // We want sending messages to feel snappy. So, if the only @@ -4800,6 +4795,40 @@ typedef enum : NSUInteger { self.previousLastTimestamp = nil; } +- (void)createNewMessageMappings +{ + if (self.thread.uniqueId.length > 0) { + self.messageMappings = [[YapDatabaseViewMappings alloc] initWithGroups:@[ self.thread.uniqueId ] + view:TSMessageDatabaseViewExtensionName]; + } else { + OWSFail(@"uniqueId unexpectedly empty for thread: %@", self.thread); + self.messageMappings = + [[YapDatabaseViewMappings alloc] initWithGroups:@[] view:TSMessageDatabaseViewExtensionName]; + } + + // Cells' appearance can depend on adjacent cells in both directions. + [self.messageMappings setCellDrawingDependencyOffsets:[NSSet setWithArray:@[ + @(-1), + @(+1), + ]] + forGroup:self.thread.uniqueId]; + + // We need to impose the range restrictions on the mappings immediately to avoid + // doing a great deal of unnecessary work and causing a perf hotspot. + [self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) { + [self.messageMappings updateWithTransaction:transaction]; + }]; + [self updateMessageMappingRangeOptions]; +} + +- (void)hardResetMappings +{ + DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + + [self createNewMessageMappings]; + [self resetMappings]; +} + - (void)resetMappings { // If we're entering "active" mode (e.g. view is visible and app is in foreground), @@ -4814,7 +4843,6 @@ typedef enum : NSUInteger { [self updateMessageMappingRangeOptions]; } self.collapseCutoffDate = [NSDate new]; - [self reloadViewItems]; [self resetContentAndLayout]; [self ensureDynamicInteractions]; @@ -4849,7 +4877,9 @@ typedef enum : NSUInteger { // This is a key method. It builds or rebuilds the list of // cell view models. -- (void)reloadViewItems +// +// Returns NO on error. +- (BOOL)reloadViewItems { NSMutableArray *viewItems = [NSMutableArray new]; NSMutableDictionary *viewItemCache = [NSMutableDictionary new]; @@ -4857,6 +4887,7 @@ typedef enum : NSUInteger { NSUInteger count = [self.messageMappings numberOfItemsInSection:0]; BOOL isGroupThread = self.isGroupConversation; + __block BOOL hasError = NO; [self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) { YapDatabaseViewTransaction *viewTransaction = [transaction ext:TSMessageDatabaseViewExtensionName]; OWSAssert(viewTransaction); @@ -4869,6 +4900,7 @@ typedef enum : NSUInteger { (unsigned long)row, (unsigned long)count); // TODO: Add analytics. + hasError = YES; continue; } if (!interaction.uniqueId) { @@ -4878,6 +4910,7 @@ typedef enum : NSUInteger { (unsigned long)count, interaction); // TODO: Add analytics. + hasError = YES; continue; } @@ -5122,6 +5155,8 @@ typedef enum : NSUInteger { self.viewItems = viewItems; self.viewItemCache = viewItemCache; + + return !hasError; } // Whenever an interaction is modified, we need to reload it from the DB From 30ce67523614d61f7588ab8a69a6fd5680162d5a Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 15 Aug 2018 17:50:55 -0400 Subject: [PATCH 2/7] "Bump build to 2.29.0.7." --- Signal/Signal-Info.plist | 2 +- SignalShareExtension/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 24db74da2..c87c1b2d4 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundleVersion - 2.29.0.6 + 2.29.0.7 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/SignalShareExtension/Info.plist b/SignalShareExtension/Info.plist index 7a769362c..a9e54a4dd 100644 --- a/SignalShareExtension/Info.plist +++ b/SignalShareExtension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 2.29.0 CFBundleVersion - 2.29.0.6 + 2.29.0.7 ITSAppUsesNonExemptEncryption NSAppTransportSecurity From db2f5bf3b04a7405888a29d4c20f21d950934131 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 15 Aug 2018 14:41:20 -0400 Subject: [PATCH 3/7] 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) { From 1e75b6518b549a2c624b5e0b29723631d8078384 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 15 Aug 2018 17:52:38 -0400 Subject: [PATCH 4/7] "Bump build to 2.29.0.8." --- Signal/Signal-Info.plist | 2 +- SignalShareExtension/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index c87c1b2d4..36e2ad3a7 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundleVersion - 2.29.0.7 + 2.29.0.8 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/SignalShareExtension/Info.plist b/SignalShareExtension/Info.plist index a9e54a4dd..893964007 100644 --- a/SignalShareExtension/Info.plist +++ b/SignalShareExtension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 2.29.0 CFBundleVersion - 2.29.0.7 + 2.29.0.8 ITSAppUsesNonExemptEncryption NSAppTransportSecurity From 0a7b3537b565ddeb19ef864c91b99a218f2d8d81 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 16 Aug 2018 09:53:01 -0400 Subject: [PATCH 5/7] Recreate message database view when message mappings are corrupt. --- .../ConversationViewController.m | 58 +++++++++---------- .../src/Storage/OWSPrimaryStorage.m | 1 + 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index d0c12495e..87fad7497 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -441,6 +441,8 @@ typedef enum : NSUInteger { { OWSAssert(thread); + DDLogInfo(@"%@ configureForThread.", self.logTag); + _thread = thread; self.actionOnOpen = action; self.focusMessageIdOnOpen = focusMessageId; @@ -3224,7 +3226,7 @@ typedef enum : NSUInteger { { OWSAssertIsOnMainThread(); - DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); if (self.shouldObserveDBModifications) { // External database modifications can't be converted into incremental updates, @@ -3233,14 +3235,12 @@ typedef enum : NSUInteger { // // We don't need to do this if we're not observing db modifications since we'll // do it when we resume. - [self hardResetMappings]; + [self resetMappings]; } } - (void)uiDatabaseWillUpdate:(NSNotification *)notification { - DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); - // HACK to work around radar #28167779 // "UICollectionView performBatchUpdates can trigger a crash if the collection view is flagged for layout" // more: https://github.com/PSPDFKit-labs/radar.apple.com/tree/master/28167779%20-%20CollectionViewBatchingIssue @@ -3257,10 +3257,12 @@ typedef enum : NSUInteger { { OWSAssertIsOnMainThread(); - DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + DDLogInfo(@"%@ uiDatabaseDidUpdate, connection snapshot: %llu, mappings snapshot: %llu.", + self.logTag, + self.uiDatabaseConnection.snapshot, + self.messageMappings.snapshotOfLastUpdate); if (!self.shouldObserveDBModifications) { - DDLogInfo(@"%@ %s ignoring", self.logTag, __PRETTY_FUNCTION__); return; } @@ -3299,9 +3301,6 @@ typedef enum : NSUInteger { return; } - - DDLogInfo(@"%@ uiDatabaseDidUpdate notifications: %@", self.logTag, notifications); - NSArray *sectionChanges = nil; NSArray *rowChanges = nil; [[self.uiDatabaseConnection ext:TSMessageDatabaseViewExtensionName] getSectionChanges:§ionChanges @@ -3369,7 +3368,7 @@ typedef enum : NSUInteger { // These errors seems to be very rare; they can only be reproduced // using the more extreme actions in the debug UI. OWSFail(@"%@ hasMalformedRowChange", self.logTag); - [self hardResetMappings]; + [self resetMappings]; [self updateLastVisibleTimestamp]; [self scrollToBottomAnimated:NO]; return; @@ -3379,7 +3378,7 @@ typedef enum : NSUInteger { if (![self reloadViewItems]) { // These errors are rare. OWSFail(@"%@ could not reload view items; hard resetting message mappings.", self.logTag); - [self hardResetMappings]; + [self resetMappings]; [self updateLastVisibleTimestamp]; [self scrollToBottomAnimated:NO]; return; @@ -3400,8 +3399,7 @@ typedef enum : NSUInteger { for (YapDatabaseViewRowChange *rowChange in rowChanges) { switch (rowChange.type) { case YapDatabaseViewChangeDelete: { - DDLogInfo(@"%@ YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", rowChange.collectionKey, rowChange.indexPath, (unsigned long)rowChange.finalIndex); @@ -3411,8 +3409,7 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeInsert: { - DDLogInfo(@"%@ YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", rowChange.collectionKey, rowChange.newIndexPath, (unsigned long)rowChange.finalIndex); @@ -3429,9 +3426,8 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeMove: { - DDLogInfo(@"%@ YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " - @"finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " + @"finalIndex: %lu", rowChange.collectionKey, rowChange.indexPath, rowChange.newIndexPath, @@ -3440,8 +3436,7 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeUpdate: { - DDLogInfo(@"%@ YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", rowChange.collectionKey, rowChange.indexPath, (unsigned long)rowChange.finalIndex); @@ -3452,7 +3447,7 @@ typedef enum : NSUInteger { } }; - DDLogInfo(@"%@ viewItems.count: %zd -> %zd", self.logTag, oldViewItemCount, self.viewItems.count); + DDLogVerbose(@"self.viewItems.count: %zd -> %zd", oldViewItemCount, self.viewItems.count); BOOL shouldAnimateUpdates = [self shouldAnimateRowUpdates:rowChanges oldViewItemCount:oldViewItemCount]; void (^batchUpdatesCompletion)(BOOL) = ^(BOOL finished) { @@ -4828,14 +4823,6 @@ typedef enum : NSUInteger { [self updateMessageMappingRangeOptions]; } -- (void)hardResetMappings -{ - DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); - - [self createNewMessageMappings]; - [self resetMappings]; -} - - (void)resetMappings { // If we're entering "active" mode (e.g. view is visible and app is in foreground), @@ -4888,6 +4875,11 @@ typedef enum : NSUInteger { // Returns NO on error. - (BOOL)reloadViewItems { + DDLogInfo(@"%@ reloadViewItems, connection snapshot: %llu, mappings snapshot: %llu.", + self.logTag, + self.uiDatabaseConnection.snapshot, + self.messageMappings.snapshotOfLastUpdate); + NSMutableArray *viewItems = [NSMutableArray new]; NSMutableDictionary *viewItemCache = [NSMutableDictionary new]; @@ -4934,6 +4926,14 @@ typedef enum : NSUInteger { } }]; + // Flag to ensure that we only increment once per launch. + static BOOL hasIncrementedDatabaseView = NO; + if (hasError && !hasIncrementedDatabaseView) { + DDLogWarn(@"%@ incrementing version of: %@", self.logTag, TSMessageDatabaseViewExtensionName); + [OWSPrimaryStorage incrementVersionOfDatabaseExtension:TSMessageDatabaseViewExtensionName]; + hasIncrementedDatabaseView = YES; + } + // Update the "break" properties (shouldShowDate and unreadIndicator) of the view items. BOOL shouldShowDateOnNextViewItem = YES; uint64_t previousViewItemTimestamp = 0; diff --git a/SignalServiceKit/src/Storage/OWSPrimaryStorage.m b/SignalServiceKit/src/Storage/OWSPrimaryStorage.m index 2a9d27050..3e8c049b4 100644 --- a/SignalServiceKit/src/Storage/OWSPrimaryStorage.m +++ b/SignalServiceKit/src/Storage/OWSPrimaryStorage.m @@ -132,6 +132,7 @@ void VerifyRegistrationsForPrimaryStorage(OWSStorage *storage) - (void)updateUIDatabaseConnectionToLatest { + OWSAssertIsOnMainThread(); // Notify observers we're about to update the database connection [[NSNotificationCenter defaultCenter] postNotificationName:OWSUIDatabaseConnectionWillUpdateNotification object:self.dbNotificationObject]; From d9d73ba70ca53bfe8b06056e1671aa216364a122 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 16 Aug 2018 09:53:06 -0400 Subject: [PATCH 6/7] "Bump build to 2.29.0.9." --- Signal/Signal-Info.plist | 2 +- SignalShareExtension/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 36e2ad3a7..82882c8cb 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundleVersion - 2.29.0.8 + 2.29.0.9 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/SignalShareExtension/Info.plist b/SignalShareExtension/Info.plist index 893964007..3cf77a9e6 100644 --- a/SignalShareExtension/Info.plist +++ b/SignalShareExtension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 2.29.0 CFBundleVersion - 2.29.0.8 + 2.29.0.9 ITSAppUsesNonExemptEncryption NSAppTransportSecurity From b347c40c667b1ab850c6b58312c2e40b993e0843 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 16 Aug 2018 12:20:55 -0400 Subject: [PATCH 7/7] Clean up ahead of PR. --- .../ConversationView/ConversationViewController.m | 12 +----------- SignalServiceKit/src/Storage/OWSStorage.m | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 87fad7497..18e387b51 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -3250,18 +3250,13 @@ typedef enum : NSUInteger { // We want to relayout our contents using the old message mappings and // view items before they are updated. [self.collectionView layoutIfNeeded]; - // ENDHACK to work around radar #28167779) + // ENDHACK to work around radar #28167779 } - (void)uiDatabaseDidUpdate:(NSNotification *)notification { OWSAssertIsOnMainThread(); - DDLogInfo(@"%@ uiDatabaseDidUpdate, connection snapshot: %llu, mappings snapshot: %llu.", - self.logTag, - self.uiDatabaseConnection.snapshot, - self.messageMappings.snapshotOfLastUpdate); - if (!self.shouldObserveDBModifications) { return; } @@ -4875,11 +4870,6 @@ typedef enum : NSUInteger { // Returns NO on error. - (BOOL)reloadViewItems { - DDLogInfo(@"%@ reloadViewItems, connection snapshot: %llu, mappings snapshot: %llu.", - self.logTag, - self.uiDatabaseConnection.snapshot, - self.messageMappings.snapshotOfLastUpdate); - NSMutableArray *viewItems = [NSMutableArray new]; NSMutableDictionary *viewItemCache = [NSMutableDictionary new]; diff --git a/SignalServiceKit/src/Storage/OWSStorage.m b/SignalServiceKit/src/Storage/OWSStorage.m index d4d898dd0..0795e52b1 100644 --- a/SignalServiceKit/src/Storage/OWSStorage.m +++ b/SignalServiceKit/src/Storage/OWSStorage.m @@ -513,7 +513,7 @@ NSString *const kNSUserDefaults_DatabaseExtensionVersionMap = @"kNSUserDefaults_ + (void)incrementVersionOfDatabaseExtension:(NSString *)extensionName { - DDLogError(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + DDLogError(@"%@ %s %@", self.logTag, __PRETTY_FUNCTION__, extensionName); NSUserDefaults *appUserDefaults = [NSUserDefaults appUserDefaults]; OWSAssert(appUserDefaults);