Skip to content

Crash when scrolling quickly through chat history #817

@chrisballinger

Description

@chrisballinger

Regression caused by #812

cc @stigger

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'layout attributes for supplementary item at index path (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}) changed from <JSQMessagesCollectionViewLayoutAttributes: 0x13398d420> index path: (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}); element kind: (UICollectionElementKindSectionHeader); frame = (0 0; 414 32); zIndex = 10;  to <JSQMessagesCollectionViewLayoutAttributes: 0x131ef8640> index path: (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}); element kind: (UICollectionElementKindSectionHeader); frame = (0 0; 414 32); zIndex = -1;  without invalidating the layout'

Thread 0 Crashed:
0   CoreFoundation                  0x000000018878afe0 __exceptionPreprocess + 124
1   libobjc.A.dylib                 0x00000001871ec538 objc_exception_throw + 52
2   CoreFoundation                  0x000000018878aeb4 +[NSException raise:format:arguments:] + 100
3   Foundation                      0x0000000189223760 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 108
4   UIKit                           0x000000018e9195c8 __45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 1324
5   UIKit                           0x000000018e918ad4 -[UICollectionViewData validateLayoutInRect:] + 1492
6   UIKit                           0x000000018f1fb184 -[UICollectionViewData layoutAttributesForCellsInRect:validateLayout:] + 144
7   UIKit                           0x000000018f1b79f4 -[UICollectionView _computePrefetchCandidatesForVisibleBounds:futureVisibleBounds:prefetchVector:notifyDelegateIfNeeded:] + 128
8   UIKit                           0x000000018f1b7954 -[UICollectionView _computePrefetchCandidatesForVelocity:notifyDelegateIfNeeded:] + 164
9   UIKit                           0x000000018f1b7884 -[UICollectionView _prefetchItemsForVelocity:maxItemsToPrefetch:invalidateCandidatesOnDirectionChanges:] + 764
10  UIKit                           0x000000018e9181ac -[UICollectionView layoutSubviews] + 700
11  UIKit                           0x000000018e8b9cc0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196
12  QuartzCore                      0x000000018baaa274 -[CALayer layoutSublayers] + 144
13  QuartzCore                      0x000000018ba9ede8 CA::Layer::layout_if_needed(CA::Transaction*) + 288
14  QuartzCore                      0x000000018ba9eca8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
15  QuartzCore                      0x000000018ba1a34c CA::Context::commit_transaction(CA::Transaction*) + 248
16  QuartzCore                      0x000000018ba413ac CA::Transaction::commit() + 500
17  QuartzCore                      0x000000018b99d530 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 596
18  IOKit                           0x00000001889f7b9c IODispatchCalloutFromCFMessage + 368
19  CoreFoundation                  0x0000000188721960 __CFMachPortPerform + 176
20  CoreFoundation                  0x0000000188739ae4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
21  CoreFoundation                  0x0000000188739284 __CFRunLoopDoSource1 + 432
22  CoreFoundation                  0x0000000188736d98 __CFRunLoopRun + 1748
23  CoreFoundation                  0x0000000188666da4 CFRunLoopRunSpecific + 420
24  GraphicsServices                0x000000018a0d1074 GSEventRunModal + 96
25  UIKit                           0x000000018e921c9c UIApplicationMain + 204
26  ChatSecure                      0x00000001000b5d78 main (main.m:14)
27  libdyld.dylib                   0x000000018767559c start + 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions