Fix number of items in section crash when adding a history item before tapping the history tab
Closed, ResolvedPublic

Description

Corey unable to reproduce on clean installs

Here is the stack trace:

2015-08-19 13:24:44.233 Wikipedia Debug[62230:1625901] [HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
2015-08-19 13:24:44.240 Wikipedia Debug[62230:1625901] [Piwik] Tracker created with siteID 4
2015-08-19 13:24:44:286 Wikipedia Debug[main] -[AppDelegate application:didFinishLaunchingWithOptions:]#L72 DEBUG:
file:///Users/mhurd/Library/Developer/CoreSimulator/Devices/DC0B8A0E-739B-42FB-A34C-B4E86271495E/data/Containers/Data/Application/6B35A5DE-CDBA-4670-88BF-C4C5ABA7060A/Documents/
2015-08-19 13:24:48:196 Wikipedia Debug[main] __47-[WMFSearchViewController searchForSearchTerm:]_block_invoke177#L209 DEBUG:
Error Domain=Search Result Fetcher Code=1 "The search parameter must be set" UserInfo=0x7fe2be03fcf0 {code=gpsnosearch, *=See https://en.wikipedia.org/w/api.php for API usage, info=The search parameter must be set, NSLocalizedDescription=The search parameter must be set}
2015-08-19 13:24:49.301 Wikipedia Debug[62230:1625901] CIContext creation with kCIContextUseSoftwareRenderer enabled is not supported on Simulator.
2015-08-19 13:24:56:600 Wikipedia Debug[main] -[WMFArticleListTransition handleDismissGesture:]#L286 INFO:
Finishing transition since user released touch above percentComplete threshold.
2015-08-19 13:25:03:399 Wikipedia Debug[main] -[WMFArticleListTransition handleDismissGesture:]#L286 INFO:
Finishing transition since user released touch above percentComplete threshold.
2015-08-19 13:25:13:360 Wikipedia Debug[main] -[WMFArticleListTransition handleDismissGesture:]#L289 INFO:
Finishing transition since user swiped above velocity threshold.
2015-08-19 13:25:17:411 Wikipedia Debug[main] -[WMFArticleListTransition handleDismissGesture:]#L286 INFO:
Finishing transition since user released touch above percentComplete threshold.
2015-08-19 13:25:19.531 Wikipedia Debug[62230:1625901] * Assertion failure in -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:], /SourceCache/UIKit_Sim/UIKit-3347.44.2/UICollectionView.m:4072
2015-08-19 13:25:19.542 Wikipedia Debug[62230:1625901]
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update (19) must be equal to the number of items contained in that section before the update (19), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).'

  • First throw call stack:

(
0 CoreFoundation 0x00000001064f7c65 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106190bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001064f7aca +[NSException raise:format:arguments:] + 106
3 Foundation 0x00000001039c198f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x00000001051b278e -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:] + 12818
5 Wikipedia Debug 0x00000001029b49f4 -[SSBaseDataSource insertCellsAtIndexPaths:] + 196
6 Wikipedia Debug 0x00000001029b2216 -[SSArrayDataSource observeValueForKeyPath:ofObject:change:context:] + 598
7 Foundation 0x0000000103909d96 NSKeyValueNotifyObserver + 356
8 Foundation 0x0000000103908fbd NSKeyValueDidChange + 466
9 Foundation 0x00000001039a0a5b -[NSObject(NSKeyValueObserverNotification) didChange:valuesAtIndexes:forKey:] + 118
10 Foundation 0x00000001039a0268 -[NSKeyValueNotifyingMutableArray addObject:] + 185
11 Wikipedia Debug 0x00000001026b4804 -[MWKList addEntry:] + 308
12 Wikipedia Debug 0x0000000102725716 -[MWKHistoryList addEntry:] + 614
13 Wikipedia Debug 0x0000000102725461 -[MWKHistoryList addPageToHistoryWithTitle:discoveryMethod:] + 225
14 Wikipedia Debug 0x00000001027595cf -[WMFArticleListCollectionViewController collectionView:didSelectItemAtIndexPath:] + 735
15 UIKit 0x00000001051ba31e -[UICollectionView touchesEnded:withEvent:] + 436
16 UIKit 0x0000000104d06050 forwardTouchMethod + 245
17 UIKit 0x0000000104d06050 forwardTouchMethod + 245
18 UIKit 0x0000000104d06050 forwardTouchMethod + 245
19 UIKit 0x0000000104bd0958 -[UIWindow _sendTouchesForEvent:] + 735
20 UIKit 0x0000000104bd1282 -[UIWindow sendEvent:] + 682
21 UIKit 0x0000000104b97541 -[UIApplication sendEvent:] + 246
22 UIKit 0x0000000104ba4cdc _UIApplicationHandleEventFromQueueEvent + 18265
23 UIKit 0x0000000104b7f59c _UIApplicationHandleEventQueue + 2066
24 CoreFoundation 0x000000010642b431
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
25 CoreFoundation 0x00000001064212fd CFRunLoopDoSources0 + 269
26 CoreFoundation 0x0000000106420934
CFRunLoopRun + 868
27 CoreFoundation 0x0000000106420366 CFRunLoopRunSpecific + 470
28 GraphicsServices 0x00000001099ada3e GSEventRunModal + 161
29 UIKit 0x0000000104b828c0 UIApplicationMain + 1282
30 Wikipedia Debug 0x00000001027875f1 main + 177
31 libdyld.dylib 0x0000000107dec145 start + 1
32 ??? 0x0000000000000005 0x0 + 5
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Fjalapeno updated the task description. (Show Details)
Fjalapeno raised the priority of this task from to Needs Triage.
Fjalapeno added a subscriber: Fjalapeno.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2015, 9:36 PM
Mhurd added a subscriber: Mhurd.Nov 10 2015, 11:33 PM

@Fjalapeno are we tableview-ifying this? If so this collection view issue may just go away?

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 10 2015, 11:33 PM

Checked with 5.0.0.515 on iPad mini iOS 8.2 and iPhone 5 iOS 9.02.

Regression testing is done on items that are being added to Recent.

JMinor closed this task as Resolved.Dec 3 2015, 12:34 AM
JMinor added a project: iOS-app-v5-beta.
JMinor set Security to None.