NSInternalInconsistencyException, reason: 'self.floatingGroupRowView should be equal to the given row view!'

My macOS app uses a NSTableView with 'Floats Group Row' enabled. This works without problems on my test Macs. However, on a regular basis I receive crash reports titled: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'self.floatingGroupRowView should be equal to the given row view!'


Does anyone know the conditions for this error?


The last part of the crashlog look similar to this:


0   CoreFoundation                       0x00007fff51db6ff3 __exceptionPreprocess + 147
1   libobjc.A.dylib                      0x00007fff78992c76 objc_exception_throw + 48
2   CoreFoundation                       0x00007fff51dbcda2 +[NSException raise:format:arguments:] + 98
3   Foundation                           0x00007fff53ebb260 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 192
4   AppKit                               0x00007fff4f656e9f -[NSTableRowData _updateFloatingGroupRowView:row:] + 421
5   AppKit                               0x00007fff4f4245db -[NSTableRowData _updateFrameRowView:row:] + 100
6   AppKit                               0x00007fff4fd03fca __48-[NSTableRowData _doAutomaticRowHeightsForRows:]_block_invoke.1004 + 47
7   AppKit                               0x00007fff4f40eae2 -[NSTableRowData enumerateAvailableRowViewsUsingBlock:] + 139
8   AppKit                               0x00007fff4fd03ede -[NSTableRowData _doAutomaticRowHeightsForRows:] + 274
9   AppKit                               0x00007fff4fd07157 __59-[NSTableRowData _automaticRowHeightsUpdateVisibleRowViews]_block_invoke.1494 + 141
10  AppKit                               0x00007fff4fd06d05 -[NSTableRowData _keepTopRowStable:andDoWorkUntilDone:] + 535
11  AppKit                               0x00007fff4fd07075 -[NSTableRowData _automaticRowHeightsUpdateVisibleRowViews] + 161
12  AppKit                               0x00007fff4f415d85 -[NSTableRowData updateVisibleRowViews] + 261
13  AppKit                               0x00007fff4f5bf24e -[NSTableRowData prepareContentInRect:] + 106
14  AppKit                               0x00007fff4f5bed46 -[NSTableView prepareContentInRect:] + 303
15  AppKit                               0x00007fff4fbbf7b1 __38-[NSView _pullInExtraTilesForOverdraw]_block_invoke + 562
16  AppKit                               0x00007fff4f484a19 -[NSView _performWorkOnTilesFromRect:renderedContentRect:maximumRect:scrollVelocity:handler:] + 1544
17  AppKit                               0x00007fff4f4841f2 -[NSView _pullInExtraTilesForOverdraw] + 854
18  AppKit                               0x00007fff4f483e6d -[NSView _doIdlePrefetch] + 37

Can you show the part of code where this occurs ?

I don't know yet which part of the code generates this crash. The crash logs are not consistently pointing to the same code lines.


In a dream world, the Apple engineer who wrote this cryptic error message, and who is probably the only one who knows what it actually means, would simply explain the conditions for this error.

NSInternalInconsistencyException, reason: 'self.floatingGroupRowView should be equal to the given row view!'
 
 
Q