Crash in Tableview cellforrow in iOS 15 beta

Hello,

I am facing crash issue when table view cellforrow have   [cell layoutIfNeeded]; this method . Also I have removed this but still facing issue in ios 15 beta. before this everything is working fine. Below is the crash log.Please help me out


Fatal Exception: NSInternalInconsistencyException Subview insertion index 1 exceeds subviews count


Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x18286fd28 __exceptionPreprocess 1 libobjc.A.dylib 0x19b0bb76c objc_exception_throw 2 Foundation 0x18410cf4c _userInfoForFileAndLine 3 UIKitCore 0x184e05458 -[_UISystemBackgroundView _internalSubviewsOfType:] 4 UIKitCore 0x184e1e380 -[_UISystemBackgroundView _layoutColorView] 5 UIKitCore 0x184e2f914 -[_UISystemBackgroundView layoutSubviews] 6 UIKitCore 0x184de0354 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] 7 QuartzCore 0x18652ad38 CA::Layer::layout_if_needed(CA::Transaction*) 8 UIKitCore 0x184e442c4 -[UIView(Hierarchy) layoutBelowIfNeeded] 9 CallHippo 0x1000a71bc -[DialerVC tableView:cellForRowAtIndexPath:] + 481 (DialerVC.m:481) 10 UIKitCore 0x184eda1b8 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] 11 UIKitCore 0x1850db824 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] 12 UIKitCore 0x184f006b4 -[UITableView _updateVisibleCellsNow:] 13 UIKitCore 0x184dd00dc -[UITableView layoutSubviews] 14 UIKitCore 0x184de0354 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] 15 QuartzCore 0x18652ad38 CA::Layer::layout_if_needed(CA::Transaction*) 16 QuartzCore 0x18651d738 CA::Layer::layout_and_display_if_needed(CA::Transaction*) 17 QuartzCore 0x186531b18 CA::Context::commit_transaction(CA::Transaction*, double, double*) 18 QuartzCore 0x18653ab9c CA::Transaction::commit() 19 UIKitCore 0x184fa8f90 __34-[UIApplication _firstCommitBlock]_block_invoke_2 20 CoreFoundation 0x182848f28 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK 21 CoreFoundation 0x182849ddc __CFRunLoopDoBlocks 22 CoreFoundation 0x1827e2970 __CFRunLoopRun 23 CoreFoundation 0x1827f624c CFRunLoopRunSpecific 24 GraphicsServices 0x19e3a0484 GSEventRunModal 25 UIKitCore 0x18516d110 -[UIApplication _run] 26 UIKitCore 0x184eea088 UIApplicationMain 27 CallHippo 0x100085e74 main + 33 (main.m:33) 28 ??? 0x101071e64 (Missing)

We're seeing this as well:

Fatal Exception: NSInternalInconsistencyException negative sizes are not supported in the flow layout

Did you find a solution for this?

in my case there was recursion by subviews and this was the reason

i was facing same issue in my application(Version - iOS15) in "SWTableViewCell" library when the tableview is gonna reloaded. if you are using same library and facing this issue then comment the following code

// if (![NSStringFromClass([[self.subviews objectAtIndex:0] class]) isEqualToString:kTableViewCellContentView])
// {
// // iOS 7
// contentViewParent = [self.subviews objectAtIndex:0];
// clipViewParent = self;
// }

This works for me like it was working in iOS 14.

Crash in Tableview cellforrow in iOS 15 beta
 
 
Q