Has anyone else noticed this?
I am using a TWTRTimelineViewController with version 1.15.2 of TwitterKit (Swift/iOS) and the app is crashing when loading some tweets.
It seems like a certain type of tweet is probably causing the crash because if I create a new application on a new device with only a Search timeline view controller the app crashes at the same point in the timeline.
If new tweets come in the app still crashes showing the same tweet further down the timeline. The first time I noticed the crash it was the 4th tweet so it crashed right away. Now itās 50 or more down so i have to scroll down a bit before the crash.
If I load up an old version with TwitterKit (not sure what the number is maybe 1.13) I am able to scroll past where the offending tweet is. In two different cases itās images which is the next visible tweet after where it would have crashed. But other images had loaded fine previously in the Timeline.
I setup an app with no other code than the default SearchTimelineViewController and I see the same issue.
Here is the full crashlog:
*** Terminating app due to uncaught exception āNSRangeExceptionā, reason: ā*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArrayā
*** First throw call stack:
(
0 CoreFoundation 0x000000010b163e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d7bddeb objc_exception_throw + 48
2 CoreFoundation 0x000000010b112395 -[__NSArray0 objectAtIndex:] + 101
3 trial 0x000000010a7cc435 +[TWTRViewUtil bestMatchSizeFromMediaEntity:fittingWidth:] + 363
4 trial 0x000000010a796f8d -[TWTRMediaEntityDisplayConfiguration initWithMediaEntity:targetWidth:] + 112
5 trial 0x000000010a7cb0ca -[TWTRTweetImageView configureWithMediaEntity:style:widthHint:] + 176
6 trial 0x000000010a7cbccd -[TWTRTweetMediaView configureWithMediaEntity:style:widthHint:] + 137
7 trial 0x000000010a7c7d30 -[TWTRTweetView configureWithTweet:] + 1684
8 trial 0x000000010a7bc1be -[TWTRTweetTableViewCell configureWithTweet:] + 79
9 trial 0x000000010a7a2f8f -[TWTRTimelineViewController tableView:cellForRowAtIndexPath:] + 223
10 UIKit 0x000000010c3f3e43 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 766
11 UIKit 0x000000010c3f3f7b -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
12 UIKit 0x000000010c3c8a39 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2996
13 UIKit 0x000000010c3fd01c -[UITableView _performWithCachedTraitCollection:] + 92
14 UIKit 0x000000010c3e3edc -[UITableView layoutSubviews] + 224
15 UIKit 0x000000010c3514a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
16 QuartzCore 0x000000010bf6a59a -[CALayer layoutSublayers] + 146
17 QuartzCore 0x000000010bf5ee70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
18 QuartzCore 0x000000010bf5ecee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
19 QuartzCore 0x000000010bf53475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
20 QuartzCore 0x000000010bf80c0a _ZN2CA11Transaction6commitEv + 486
21 QuartzCore 0x000000010bf8f9f4 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 576
22 CoreFoundation 0x000000010b0c3c84 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
23 CoreFoundation 0x000000010b0c3831 __CFRunLoopDoTimer + 1089
24 CoreFoundation 0x000000010b085241 __CFRunLoopRun + 1937
25 CoreFoundation 0x000000010b084828 CFRunLoopRunSpecific + 488
26 GraphicsServices 0x000000010fce0ad2 GSEventRunModal + 161
27 UIKit 0x000000010c29a610 UIApplicationMain + 171
28 trial 0x000000010a7598ad main + 109
29 libdyld.dylib 0x000000010e2cf92d start + 1
30 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException