Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if app preselects a collection view cell #5

Open
gerchicov-vg opened this issue Aug 7, 2024 · 0 comments
Open

Crash if app preselects a collection view cell #5

gerchicov-vg opened this issue Aug 7, 2024 · 0 comments

Comments

@gerchicov-vg
Copy link

gerchicov-vg commented Aug 7, 2024

2024-08-07 15:10:59.514557+0300 JunoVideoChat[47160:14752608] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView (<UICollectionView 0x15f099a00>) is stuck in its update/layout loop. This can happen for many reasons, including self-sizing views whose preferred attributes are not returning a consistent size. To debug this issue, check the Console app for logs in the "UICollectionViewRecursion" category.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001803f3d70 __exceptionPreprocess + 236
	1   libobjc.A.dylib                     0x000000018019814c objc_exception_throw + 56
	2   Foundation                          0x000000018075b560 _userInfoForFileAndLine + 0
	3   UIKitCore                           0x0000000184461ae0 -[UICollectionView _setNeedsVisibleCellsUpdate:withLayoutAttributes:] + 468
	4   UIKitCore                           0x000000018448e7b8 -[UICollectionView _invalidateLayoutWithContext:] + 1288
	5   UIKitCore                           0x00000001844bb9dc -[UICollectionViewLayout invalidateLayoutWithContext:] + 180
	6   JunoVideoChat                       0x000000010424f78c $s30SwiftyCollectionViewFlowLayoutAAC010invalidateE04withySo012UICollectioncE19InvalidationContextC_tF + 920
	7   JunoVideoChat                       0x000000010424f7e8 $s30SwiftyCollectionViewFlowLayoutAAC010invalidateE04withySo012UICollectioncE19InvalidationContextC_tFTo + 52
	8   UIKitCore                           0x0000000184466184 -[UICollectionView _checkForPreferredAttributesInView:originalAttributes:] + 832
	9   UIKitCore                           0x000000018446fb54 -[UICollectionView _updateVisibleCellsNow:] + 6124
	10  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	11  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	12  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	13  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	14  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	15  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	16  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	17  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	18  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	19  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	20  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	21  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	22  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	23  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	24  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	25  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	26  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	27  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	28  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	29  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	30  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	31  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	32  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	33  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	34  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	35  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	36  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	37  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	38  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	39  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	40  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	41  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	42  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	43  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	44  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	45  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	46  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	47  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	48  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	49  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	50  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	51  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	52  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	53  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	54  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	55  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	56  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	57  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	58  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	59  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	60  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	61  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	62  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	63  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	64  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	65  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	66  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	67  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	68  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	69  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	70  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	71  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	72  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	73  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	74  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	75  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	76  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	77  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	78  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	79  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	80  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	81  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	82  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	83  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	84  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	85  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	86  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	87  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	88  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	89  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	90  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	91  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	92  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	93  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	94  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	95  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	96  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	97  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	98  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	99  UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	100 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	101 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	102 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	103 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	104 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	105 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	106 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	107 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	108 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	109 UIKitCore                           0x0000000184470518 -[UICollectionView _updateVisibleCellsNow:] + 8624
	110 UIKitCore                           0x00000001844738f8 -[UICollectionView layoutSubviews] + 316
	111 UIKitCore                           0x00000001852f7434 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2588
	112 QuartzCore                          0x000000018852c8ec _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 472
	113 QuartzCore                          0x00000001885376f0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 116
	114 QuartzCore                          0x000000018847053c _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 448
	115 QuartzCore                          0x000000018849c554 _ZN2CA11Transaction6commitEv + 696
	116 QuartzCore                          0x000000018849d7ac _ZN2CA11Transaction25flush_as_runloop_observerEb + 68
	117 CoreFoundation                      0x0000000180360f10 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
	118 CoreFoundation                      0x000000018035b5a4 __CFRunLoopDoObservers + 572
	119 CoreFoundation                      0x000000018035baf8 __CFRunLoopRun + 968
	120 CoreFoundation                      0x000000018035b218 CFRunLoopRunSpecific + 572
	121 GraphicsServices                    0x000000018c25f60c GSEventRunModal + 160
	122 UIKitCore                           0x0000000184d88a98 -[UIApplication _run] + 992
	123 UIKitCore                           0x0000000184d8d634 UIApplicationMain + 112
	124 libswiftUIKit.dylib                 0x00000001b6946224 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 100
	125 JunoVideoChat                       0x0000000102c60f68 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 120
	126 JunoVideoChat                       0x0000000102c60ee4 $s13JunoVideoChat11AppDelegateC5$mainyyFZ + 32
	127 JunoVideoChat                       0x0000000102c60fe4 main + 28
	128 dyld                                0x0000000107979cd8 start_sim + 20
	129 ???                                 0x0000000107c120e0 0x0 + 4425064672
	130 ???                                 0x6866000000000000 0x0 + 7522700227568992256

unfortunately this happens in a private code I can't share. The only hint I found is it happens when you select a cell programmatically:

collectionView.selectItem(
            at: ...,
            animated: false,
            scrollPosition: .top
        )

To fix it I "kill" (replace) the layout from this library, select cell and return layout back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant