Subject: Re: bug#56259: 29.0.50; Illegal -layoutSubtreeIfNeeded on NS

From: Daniel Martín <[email-masked]>
Date: Mon, 27 Jun 2022 17:05:16 +0200

Gerd Möllmann <[email-masked]> writes:

> On macOS 12.4, selecting Options -> Set Default Font from the menu bar 
> reproducibly prints a message to the terminal:
>
> emacs[76309:7042282] It's not legal to call -layoutSubtreeIfNeeded on
> a view which is already being laid out.  If you are implementing the
> view's -layout method, you can call -[super layout] instead. Break on
> void _NSDetectedLayoutRecursion(void) to debug.  This will be logged
> only once.  This may break in the future.
>

I wonder if this is a bug in macOS 12.4 (concretely, in NSFontManager's
orderFrontFontPanel) and not in Emacs.  For example, I can reproduce the
same warning if I try to open the Fonts panel in the standard TextEdit
app created by Apple.