Crash in MWKImageList - NSAssert tripping on line 204
Closed, InvalidPublic

Description

Unsure how to repro. It randomly happened.

Trace:

2015-08-19 15:25:38.610 Wikipedia Debug[66574:1697910] [HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
2015-08-19 15:25:38.618 Wikipedia Debug[66574:1697910] [Piwik] Tracker created with siteID 4
2015-08-19 15:25:38:670 Wikipedia Debug[main] -[AppDelegate application:didFinishLaunchingWithOptions:]#L72 DEBUG:
file:///Users/mhurd/Library/Developer/CoreSimulator/Devices/DC0B8A0E-739B-42FB-A34C-B4E86271495E/data/Containers/Data/Application/51EA7048-4F88-44B5-AACF-6D6A4C372BDF/Documents/
2015-08-19 15:25:43:723 Wikipedia Debug[main] __47-[WMFSearchViewController searchForSearchTerm:]_block_invoke177#L209 DEBUG:
Error Domain=Search Result Fetcher Code=1 "The search parameter must be set" UserInfo=0x7fd32b8d9d80 {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 15:25:44.892 Wikipedia Debug[66574:1697910] CIContext creation with kCIContextUseSoftwareRenderer enabled is not supported on Simulator.
2015-08-19 15:25:52:485 Wikipedia Debug[main] -[WMFArticleListTransition handleDismissGesture:]#L286 INFO:
Finishing transition since user released touch above percentComplete threshold.
2015-08-19 15:25:56:019 Wikipedia Debug[main] __47-[WMFSearchViewController searchForSearchTerm:]_block_invoke177#L209 DEBUG:
Error Domain=Search Result Fetcher Code=1 "The search parameter must be set" UserInfo=0x7fd32b977620 {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 15:26:04:624 Wikipedia Debug[com.apple.root.background-qos] -[MWKSectionList importSectionsFromDisk]#L91 DEBUG:
Failed to import sections at path /Users/mhurd/Library/Developer/CoreSimulator/Devices/DC0B8A0E-739B-42FB-A34C-B4E86271495E/data/Containers/Data/Application/51EA7048-4F88-44B5-AACF-6D6A4C372BDF/Documents/Data/sites/wikipedia.org/en/articles/Cosine/sections, leaving list empty.
2015-08-19 15:26:04:979 Wikipedia Debug[com.apple.root.background-qos] -[WMFArticleFetcher serializedArticleWithTitle:response:]#L216 DEBUG:
*** Collection <__NSArrayM: 0x7fd32b918d30> was mutated while being enumerated.
2015-08-19 15:26:05.937 Wikipedia Debug[66574:1697947] Property list invalid for format: 100 (property list arrays cannot contain NULL)
2015-08-19 15:26:06.237 Wikipedia Debug[66574:1697910] *** Assertion failure in -[MWKImageList uniqueLargestVariants], /Users/mhurd/apps-ios-wikipedia/wikipedia/MediaWikiKit/MediaWikiKit/MWKImageList.m:204
2015-08-19 15:26:06.248 Wikipedia Debug[66574:1697910] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't retrieve image record for image list entry: (null)'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000111b48c65 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x00000001117e1bb7 objc_exception_throw + 45
	2   CoreFoundation                      0x0000000111b48aca +[NSException raise:format:arguments:] + 106
	3   Foundation                          0x000000010f01298f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
	4   Wikipedia Debug                     0x000000010dc9d301 -[MWKImageList uniqueLargestVariants] + 961
	5   Wikipedia Debug                     0x000000010dd359ec -[WMFArticleHeaderImageGalleryViewController setImagesFromCachedArticle:] + 332
	6   Wikipedia Debug                     0x000000010dd3586e -[WMFArticleHeaderImageGalleryViewController setImagesFromArticle:] + 94
	7   Wikipedia Debug                     0x000000010dc935b5 __49-[WMFArticleViewController fetchArticleForTitle:]_block_invoke136 + 133
	8   Wikipedia Debug                     0x000000010dcfe531 ___PMKCallVariadicBlock_block_invoke + 337
	9   Wikipedia Debug                     0x000000010dcfcfd9 _PMKCallVariadicBlock + 1065
	10  Wikipedia Debug                     0x000000010dcfc8dd PMKCallVariadicBlock + 77
	11  Wikipedia Debug                     0x000000010dd050d2 ____then_block_invoke_2 + 50
	12  libdispatch.dylib                   0x00000001133ea186 _dispatch_call_block_and_release + 12
	13  libdispatch.dylib                   0x0000000113409614 _dispatch_client_callout + 8
	14  libdispatch.dylib                   0x00000001133f1a1c _dispatch_main_queue_callback_4CF + 1664
	15  CoreFoundation                      0x0000000111ab01f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	16  CoreFoundation                      0x0000000111a71dcb __CFRunLoopRun + 2043
	17  CoreFoundation                      0x0000000111a71366 CFRunLoopRunSpecific + 470
	18  GraphicsServices                    0x0000000114ffea3e GSEventRunModal + 161
	19  UIKit                               0x00000001101d38c0 UIApplicationMain + 1282
	20  Wikipedia Debug                     0x000000010ddd85f1 main + 177
	21  libdyld.dylib                       0x000000011343d145 start + 1
	22  ???                                 0x0000000000000005 0x0 + 5
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Mhurd created this task.Aug 19 2015, 10:35 PM
Mhurd updated the task description. (Show Details)
Mhurd raised the priority of this task from to Needs Triage.
Mhurd added subscribers: Mhurd, BGerstle-WMF.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2015, 10:35 PM
Mhurd updated the task description. (Show Details)Aug 19 2015, 10:36 PM
Mhurd set Security to None.
Mhurd updated the task description. (Show Details)
Mhurd closed this task as Invalid.Sep 21 2015, 10:48 PM

Marked as invalid as I can't seem to reproduce...