GNU bug report logs - #53481
27.2; macOS - recursive _layoutViewTree warning at startup

Previous Next

Package: emacs;

Reported by: Roger Willcocks <roger <at> filmlight.ltd.uk>

Date: Sun, 23 Jan 2022 16:55:03 UTC

Severity: normal

Found in version 27.2

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53481 in the body.
You can then email your comments to 53481 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53481; Package emacs. (Sun, 23 Jan 2022 16:55:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roger Willcocks <roger <at> filmlight.ltd.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Jan 2022 16:55:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Roger Willcocks <roger <at> filmlight.ltd.uk>
To: bug-gnu-emacs <at> gnu.org
Cc: Roger Willcocks <roger <at> filmlight.ltd.uk>
Subject: 27.2; macOS - recursive _layoutViewTree warning at startup
Date: Sun, 23 Jan 2022 14:52:41 +0000
Hi folks,

Starting emacs (https://emacsformacosx.com/) from a macOS terminal prompt
causes a warning which suggests something may break in the future:

<-->
% emacs -Q
2022-01-23 14:30:34.131 Emacs-x86_64-10_14[32403:2930258] 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.
<-->

There are no apparent ill effects apart from the irritating terminal
noise. The same warning appears if the program is launched using

<-->
% open /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_14
<—>

which creates both an editor gui window and a separate terminal
window containing the warning text.

The full stacktrace is:

<-->
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00007ff80534b2c5 AppKit`_NSDetectedLayoutRecursion
    frame #1: 0x00007ff804b35684 AppKit`-[NSWindow(NSConstraintBasedLayout) _layoutViewTree] + 148
    frame #2: 0x00007ff804b31f69 AppKit`-[NSWindow _oldPlaceWindow:fromServer:] + 710
    frame #3: 0x00007ff804b3093f AppKit`-[NSWindow _setFrameCommon:display:fromServer:] + 2696
    frame #4: 0x00000001001daaee Emacs-x86_64-10_14`-[EmacsWindow setFrame:display:animate:] + 62
    frame #5: 0x00007ff804bf87db AppKit`-[NSThemeFrame _growWindowReshapeContentAndToolbarView:withOldToolbarFrameSize:animate:] + 1896
    frame #6: 0x00007ff804bf7f39 AppKit`-[NSThemeFrame _reshapeContentAndToolbarView:withOldToolbarFrameSize:resizeWindow:animate:] + 612
    frame #7: 0x00007ff804be472c AppKit`-[NSThemeFrame _toolbarFrameSizeChanged:oldSize:] + 73
    frame #8: 0x00007ff804be4688 AppKit`-[NSWindow _toolbarFrameSizeChanged:oldSize:] + 93
    frame #9: 0x00007ff804bd8ad2 AppKit`-[NSToolbarView _layoutDirtyItemViewersAndTileToolbar] + 473
    frame #10: 0x00007ff804bfed7b AppKit`-[NSToolbarView layout] + 63
    frame #11: 0x00007ff804b36b8f AppKit`_NSViewLayout + 564
    frame #12: 0x00007ff804b36661 AppKit`-[NSView _layoutSubtreeWithOldSize:] + 352
    frame #13: 0x00007ff804b367bc AppKit`-[NSView _layoutSubtreeWithOldSize:] + 699
    frame #14: 0x00007ff804b367bc AppKit`-[NSView _layoutSubtreeWithOldSize:] + 699
    frame #15: 0x00007ff804b367bc AppKit`-[NSView _layoutSubtreeWithOldSize:] + 699
    frame #16: 0x00007ff804b35b78 AppKit`-[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 1041
    frame #17: 0x00007ff804b35684 AppKit`-[NSWindow(NSConstraintBasedLayout) _layoutViewTree] + 148
    frame #18: 0x00007ff804bac240 AppKit`-[NSWindow(NSConstraintBasedLayout) layoutIfNeeded] + 251
    frame #19: 0x00007ff804bac080 AppKit`__NSWindowGetDisplayCycleObserverForLayout_block_invoke + 430
    frame #20: 0x00007ff804bab30c AppKit`NSDisplayCycleObserverInvoke + 155
    frame #21: 0x00007ff804baae97 AppKit`NSDisplayCycleFlush + 952
    frame #22: 0x00007ff80911f434 QuartzCore`CA::Transaction::run_commit_handlers(CATransactionPhase) + 98
    frame #23: 0x00007ff80911e1b2 QuartzCore`CA::Transaction::commit() + 376
    frame #24: 0x00007ff804c4c4e2 AppKit`__62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
    frame #25: 0x00007ff805392724 AppKit`___NSRunLoopObserverCreateWithHandler_block_invoke + 41
    frame #26: 0x00007ff8020b5c07 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    frame #27: 0x00007ff8020b5aa4 CoreFoundation`__CFRunLoopDoObservers + 543
    frame #28: 0x00007ff8020b4f37 CoreFoundation`__CFRunLoopRun + 841
    frame #29: 0x00007ff8020b452d CoreFoundation`CFRunLoopRunSpecific + 563
    frame #30: 0x00007ff80acd23e1 HIToolbox`RunCurrentEventLoopInMode + 292
    frame #31: 0x00007ff80acd2008 HIToolbox`ReceiveNextEventCommon + 284
    frame #32: 0x00007ff80acd1ed5 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 70
    frame #33: 0x00007ff804adf8f0 AppKit`_DPSNextEvent + 886
    frame #34: 0x00007ff804addf5c AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1411
    frame #35: 0x00007ff804ad0359 AppKit`-[NSApplication run] + 586
    frame #36: 0x00000001001cfa3a Emacs-x86_64-10_14`-[EmacsApp run] + 362
    frame #37: 0x00000001001dc86c Emacs-x86_64-10_14`ns_read_socket + 684
    frame #38: 0x00000001000cce25 Emacs-x86_64-10_14`gobble_input + 245
    frame #39: 0x00000001000ca34d Emacs-x86_64-10_14`detect_input_pending_run_timers + 317
    frame #40: 0x00000001000c7d84 Emacs-x86_64-10_14`read_char + 5284
    frame #41: 0x00000001000c4d4a Emacs-x86_64-10_14`read_key_sequence + 1722
    frame #42: 0x00000001000c354c Emacs-x86_64-10_14`command_loop_1 + 1340
    frame #43: 0x0000000100149f57 Emacs-x86_64-10_14`internal_condition_case + 263
    frame #44: 0x00000001000d36d0 Emacs-x86_64-10_14`command_loop_2 + 48
    frame #45: 0x000000010014977b Emacs-x86_64-10_14`internal_catch + 267
    frame #46: 0x0000000100207a85 Emacs-x86_64-10_14`command_loop.cold.1 + 69
    frame #47: 0x00000001000c2613 Emacs-x86_64-10_14`command_loop + 131
    frame #48: 0x00000001000c2543 Emacs-x86_64-10_14`recursive_edit_1 + 115
    frame #49: 0x00000001000c279b Emacs-x86_64-10_14`Frecursive_edit + 347
    frame #50: 0x00000001000c131c Emacs-x86_64-10_14`main + 7452
    frame #51: 0x00000001007a84fe dyld`start + 462
<-->

--
Roger



In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2021-11-18 built on builder10-14.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.0.1

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 44862 6866)
(symbols 48 5924 1)
(strings 32 15240 1779)
(string-bytes 1 505310)
(vectors 16 10175)
(vector-slots 8 126913 9484)
(floats 8 19 33)
(intervals 56 189 0)
(buffers 1000 11))




Reply sent to Alan Third <alan <at> idiocy.org>:
You have taken responsibility. (Sun, 23 Jan 2022 20:20:01 GMT) Full text and rfc822 format available.

Notification sent to Roger Willcocks <roger <at> filmlight.ltd.uk>:
bug acknowledged by developer. (Sun, 23 Jan 2022 20:20:01 GMT) Full text and rfc822 format available.

Message #10 received at 53481-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Roger Willcocks <roger <at> filmlight.ltd.uk>
Cc: 53481-done <at> debbugs.gnu.org
Subject: Re: bug#53481: 27.2; macOS - recursive _layoutViewTree warning at
 startup
Date: Sun, 23 Jan 2022 20:19:30 +0000
On Sun, Jan 23, 2022 at 02:52:41PM +0000, Roger Willcocks via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
> Hi folks,
> 
> Starting emacs (https://emacsformacosx.com/) from a macOS terminal prompt
> causes a warning which suggests something may break in the future:
> 
> <-->
> % emacs -Q
> 2022-01-23 14:30:34.131 Emacs-x86_64-10_14[32403:2930258] 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.
> <-->

Thanks, this should already be fixed in Emacs 28.

-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53481; Package emacs. (Sun, 23 Jan 2022 20:33:01 GMT) Full text and rfc822 format available.

Message #13 received at 53481-done <at> debbugs.gnu.org (full text, mbox):

From: Roger Willcocks <roger <at> filmlight.ltd.uk>
To: Alan Third <alan <at> idiocy.org>
Cc: Roger Willcocks <roger <at> filmlight.ltd.uk>, 53481-done <at> debbugs.gnu.org
Subject: Re: bug#53481: 27.2; macOS - recursive _layoutViewTree warning at
 startup
Date: Sun, 23 Jan 2022 20:32:23 +0000

> On 23 Jan 2022, at 20:19, Alan Third <alan <at> idiocy.org> wrote:
> 
> On Sun, Jan 23, 2022 at 02:52:41PM +0000, Roger Willcocks via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
>> Hi folks,
>> 
>> Starting emacs (https://emacsformacosx.com/) from a macOS terminal prompt
>> causes a warning which suggests something may break in the future:
>> 
>> <-->
>> % emacs -Q
>> 2022-01-23 14:30:34.131 Emacs-x86_64-10_14[32403:2930258] 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.
>> <-->
> 
> Thanks, this should already be fixed in Emacs 28.
> 

Thanks Alan






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Feb 2022 12:24:15 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Bob Kline <bkline <at> rksystems.com> to control <at> debbugs.gnu.org. (Sat, 03 Sep 2022 15:32:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53481; Package emacs. (Sat, 03 Sep 2022 15:33:03 GMT) Full text and rfc822 format available.

Message #20 received at 53481 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: 53481 <at> debbugs.gnu.org
Subject: Re: bug#53481: 27.2;
 macOS - recursive _layoutViewTree warning at startup
Date: Sat, 3 Sep 2022 09:47:05 -0400
On 23 Jan 2022, at 20:19, Alan Third <alan <at> idiocy.org> wrote:

> Thanks, this should already be fixed in Emacs 28.

Unfortunately, that doesn't seem to have happened.

% emacs --version
GNU Emacs 28.1
Copyright (C) 2022 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
% emacs -Q
2022-09-03 09:35:53.118 Emacs-x86_64-10_14[37072:11711478] 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.

-- 
Bob Kline
https://www.rksystems.com
mailto:bkline <at> rksystems.com




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Oct 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.