From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christian Tanzer via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS) Date: Sun, 10 Sep 2023 15:59:49 +0100 Message-ID: <036BF52A-4EBC-4F33-8A52-7DF60F753A3D@gg32.com> References: Reply-To: Christian Tanzer Mime-Version: 1.0 (1.0) Content-Type: multipart/alternative; boundary=Apple-Mail-05B6E96B-9BA3-4C51-897F-E39CB2B1C8E8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29644"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , 65843@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 10 17:01:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qfLw8-0007Y4-Hi for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Sep 2023 17:01:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfLvo-0003wQ-RB; Sun, 10 Sep 2023 11:01:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfLvm-0003wA-Q7 for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 11:00:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfLvm-0007yc-Hj for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 11:00:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfLvq-0006T3-0h for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 11:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christian Tanzer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Sep 2023 15:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65843 X-GNU-PR-Package: emacs Original-Received: via spool by 65843-submit@debbugs.gnu.org id=B65843.169435801724802 (code B ref 65843); Sun, 10 Sep 2023 15:01:01 +0000 Original-Received: (at 65843) by debbugs.gnu.org; 10 Sep 2023 15:00:17 +0000 Original-Received: from localhost ([127.0.0.1]:51087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfLv6-0006Rx-Cj for submit@debbugs.gnu.org; Sun, 10 Sep 2023 11:00:16 -0400 Original-Received: from mx0.gg32.com ([168.119.248.232]:31294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfLv1-0006QX-Aw for 65843@debbugs.gnu.org; Sun, 10 Sep 2023 11:00:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20220514; bh=ao1F+92aUO7 NTLvgJrKwuno+fK/OhJ3muPHQaai/3h4=; h=to:in-reply-to:cc:references: date:subject:from; d=gg32.com; b=qcwbXLoXtnbXK1XYvwmi84bnFssoIGLXIkY++ 3hI9SWN6JmMNdPGIxCFooTvF9czzyoGovnayQ4k9zQJg/h0kbzk+g/UMs5xlpIJpZ8jDJS xR8R67tcHWEJKBab3hyccx9dssg2BksEK+yjJoS2pF9FLueM9XcvMdZ/2+EkJi8MT+Toqp Uw9qVL93dDmVGKEN0LQUr+0nM5UA4NpLMlugCgraIEXlmRgI9QaJMBrgNG285aStMBfAMH dM0KI8nWOoHbm9dfpe3i/juKTCs/6XdpVcrpOt5L/Y3K7eUz2Skx1uwRzT+SkXEiiojyvR cWk9Og1qCctLgyYRonHothVjw== Original-Received: by mx0.gg32.com (OpenSMTPD) with ESMTPSA id 00982b9c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 10 Sep 2023 16:00:00 +0100 (WEST) In-Reply-To: X-Mailer: iPad Mail (20G81) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269970 Archived-At: --Apple-Mail-05B6E96B-9BA3-4C51-897F-E39CB2B1C8E8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10.09.2023, at 05:20, Gerd M=C3=B6llmann wrote= : >=20 >>> On Sat, Sep 09, 2023 at 04:35:56PM -0000, Christian Tanzer via Bug repor= ts for GNU Emacs, the Swiss army knife of text editors wrote: >>>=20 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >>> In Emacs 28 and Emacs 29, desktop-load crashes when there are too many >>> iconified frames in the .emacs.desktop file. >>>=20 >>> The two attached .emacs.desktop files show the smallest test case that >>> I could come up with: >>>=20 >>> - .emacs.desktop.works with 3 non-iconified and 4 iconified frames >>> loads without problem in Emacs 28 >>>=20 >>> + desktop-load of this file crashes in Emacs 29.1 >>>=20 >>> + a .emacs.desktop with 3 non-iconified and 3 iconified frames works >>> in Emacs 29.1 >>>=20 >>> - .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames >>> leads to a crash in Emacs 28 (see attached problem report generated >>> by macOS) >>>=20 >>> - I tried .emacs.desktop with up to 17 non-iconified frames in Emacs >>> 28 without problems >>>=20 >>> - Up to Emacs 27, I've never seen a problem with desktop-load crashing >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >>=20 > Alas, I cannot reproduce the abort here, with an unpatched master or > emacs-29, and neither on Ventura/arm64 nor Big Sur/x86_64 :-(. >=20 > Christian, can you reproduce this with emacs -Q? Or does it perhaps > depend on your init.el? (This was the case for me in the child frane > case that Alan fixed.) Emacs29 -Q also crashes, but differently: /Applications/Emacs-29.1.app/Contents/MacOS/Emacs --load=3Demacs28_desktop_l= oad_init.el Fatal error 11: Segmentation fault Abort trap: 6 /Applications/Emacs-29.1.app/Contents/MacOS/Emacs -Q --load=3Demacs28_deskto= p_load_init.el objc[23222]: autorelease pool page 0x12a43c000 corrupted magic 0x2a05b000 0x00000001 0x000000eb 0x00000000 should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341 pthread 0x1e695e05d should be 0x1e695e080 Fatal error 6: Aborted Abort trap: 6 with emacs28_desktop_load_init.el: (setq desktop-path '("~/tmp/")) (require 'desktop) (desktop-read) Emacs28 -Q doesn=E2=80=99t crash: /Applications/Emacs-28.2.app/Contents/MacOS/Emacs --load=3Demacs28_desktop_l= oad_init.el Fatal error 11: Segmentation fault Abort trap: 6 /Applications/Emacs-28.2.app/Contents/MacOS/Emacs -Q --load=3Demacs28_deskto= p_load_init.el ### no crash, desktop-read works Weirder and weirder =E2=80=A6 I tried to come up with a simpler desktop to trigger the crash, but 8 frames= with the *scratch* buffer, 4 iconified, are not enough to trigger it.=20 OTOH, opening two empty files 1 and 2 with 4 frames for each one and two fra= mes of each file iconified triggers the crash in Emacs29 without the =E2=80=98= -Q=E2=80=99, so only with my init-file involved. Gerd, did you test with the .emacs.desktop files I attached to the bug repor= t? My environment configures desktop-save to save iconified frames which sta= ndard Emacs doesn=E2=80=99t do. I have only seen crashes where there were mo= re than 3 or 4 iconified frames in the .emacs.desktop. --Apple-Mail-05B6E96B-9BA3-4C51-897F-E39CB2B1C8E8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10.09.2023, at 05:20, Gerd M=C3=B6llmann= <gerd.moellmann@gmail.com> wrote:

On Sat, Sep 09, 2023 at 04:35:56PM -0000, C= hristian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text e= ditors wrote:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
In Emacs 28 and Emacs= 29, desktop-load crashes when there are too many
iconifie= d frames in the .emacs.desktop file.

Th= e two attached .emacs.desktop files show the smallest test case that<= br>
I could come up with:

<= /blockquote>
- .ema= cs.desktop.works with 3 non-iconified and 4 iconified frames
 loads without problem in Emacs 28

<= span>  + desktop-load of this file crashes in Emacs 29.1

 + a .emacs.desktop with 3 non-iconified and 3 i= conified frames works
   in Emacs 29.1

=
- .emacs.desktop.crashes with 3 non-iconifie= d and 5 iconified frames
 leads to a crash in Emacs 2= 8 (see attached problem report generated
 by macOS)<= /span>

- I tried .emacs.desktop with up to 17 n= on-iconified frames in Emacs
 28 without problems

- Up to Emacs 27, I've never seen a probl= em with desktop-load crashing
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Alas, I c= annot reproduce the abort here, with an unpatched master or
= emacs-29, and neither on Ventura/arm64 nor Big Sur/x86_64 :-(.

Christian, can you reproduce this with emacs -Q?  O= r does it perhaps
depend on your init.el?  (This was th= e case for me in the child frane
case that Alan fixed.)

Emacs29 -Q also crashes, but differently:<= /div>

/Applications/Emacs-29.1.app/Contents= /MacOS/Emacs --load=3Demacs28_desktop_load_init.el
=
    Fatal error 11: Segmentation fa= ult
    Abo= rt trap: 6

/Applications/Emacs-29.1.app/Contents/MacOS/Emacs -Q --load=3Demacs28_d= esktop_load_init.el
    objc[23222]: autorelease pool page 0x12a43c000 corrupted<= /font>
   =   magic     0x2a05b000 0x00000001 0x000000eb 0x00000000
    &nb= sp; should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
=
      pthread &n= bsp; 0x1e695e05d
      should be 0x1e695e080

=
    Fatal error 6: Aborted
<= /div>
    Abort trap: 6=

<= /blockquote>
with emacs28_desktop_load_init.el:

(setq= desktop-path '("~/tmp/"))
(require 'desktop)
(desktop-read)

<= /font>
Emacs28 -Q d= oesn=E2=80=99t crash:

/Applications= /Emacs-28.2.app/Contents/MacOS/Emacs --load=3Demacs28_desktop_load_init.el
=
    Fatal error 11: Segmentation fault
    A= bort trap: 6

<= blockquote style=3D"margin: 0 0 0 40px; border: none; padding: 0px;">
/Applic= ations/Emacs-28.2.app/Contents/MacOS/Emacs -Q --load=3Demacs28_desktop_load_= init.el
    ### no crash, desktop-read works
<= font face=3D"Menlo">
=
Weirder and weirder =E2=80=A6
I tried to come up with a simpler desktop to trigger the crash, b= ut 8 frames with the *scratch* buffer, 4 iconified, are not enough to trigge= r it. 

OTOH, opening two empty files 1 and 2 w= ith 4 frames for each one and two frames of each file iconified triggers the= crash in Emacs29 without the =E2=80=98-Q=E2=80=99, so only with my init-fil= e involved.

Gerd, did you test with the .emacs.desk= top files I attached to the bug report? My environment configures desktop-sa= ve to save iconified frames which standard Emacs doesn=E2=80=99t do. I have o= nly seen crashes where there were more than 3 or 4 iconified frames in the .= emacs.desktop.

= --Apple-Mail-05B6E96B-9BA3-4C51-897F-E39CB2B1C8E8--