Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3 or more *consecutive* layout passes to prepare to be shown. Error

When I open an NSPopover I am getting the following error:

WARNING: <NSPopover: 0x618000120780> needed 3 or more *consecutive* layout
passes to prepare to be shown. Verify that nothing in your view hierarchy
is aggressively dirtying layout during layout, as this will likely
cause problems elsewhere.

This has only just started appearing in a recent build and I can not find what is causing it. I have removed all prep code before the popover is shown so it basically calls:

- (IBAction)addClicked:(id)sender {

[[self addPopover] showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMaxYEdge];

}

I have removed all constraints from the window in IB too. So I shouldn't be doing anything during layout that requires a repaint.

Searching the web comes up with very little info, what I could find anyway. My popover is used for a form input so has 4 NSTextFields an NSOutlineView and an NSImage. It also creates a hidden WebView which is not visible to the user and used for server processing.

OSX 10.7+

Any ideas? Thanks Geoff

like image 729
GeoffCoope Avatar asked Jul 25 '16 22:07

GeoffCoope


1 Answers

if you ever get this error, I removed it by selecting the view effects inspector in IB and put a checkmark next to view (the entire popup view) for the Core Animation Layer. Now I can have square buttons with template images and no obscure warning.

like image 138
GeoffCoope Avatar answered Oct 20 '22 06:10

GeoffCoope