From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size Date: Wed, 11 Sep 2024 16:37:58 +0200 Message-ID: <0e489c29-8274-4610-835a-b01c66a48fca@gmx.at> References: <86le07624j.fsf@gnu.org> <60579ab6-db81-4f6e-b281-0cee03dc3b82@gmx.at> <86cyli4fxj.fsf@gnu.org> <86seue2l2b.fsf@gnu.org> <2d8e4603-5ea6-41e9-abfe-461392f717db@gmx.at> <4c3591f1-7c26-489f-ba68-8586e98cd99e@gmx.at> <861q1qpehg.fsf@gnu.org> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: n142857@gmail.com, 73022@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 11 16:48:00 2024 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 1soOdU-0005BD-Ft for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Sep 2024 16:48:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soOZB-0004kx-EX; Wed, 11 Sep 2024 10:43:40 -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 1soOUj-0006oC-FH for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 10:39:02 -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 1soOUi-0005UT-0t for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 10:38:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=ncoLq5uwQ6neWh2sEMhFuGkOC5Yf63LXoMWGtBDrEP4=; b=S8RqvopCRA+0VkjiLnN9NsoHRY/5Dzyj/Wx92//9ZV39suD8pSxxpOguyJ/V2cahKk31Wsu96S2JVlxAMZfYw4Hsi4+/jzs94JVb79KOuDVZcrEE2yuUVCGQQfw24zMDp3VSqLdAJb/hvFRgDYfV8zHpKzv0TdzqZ5a0QYgQfPW4T3OQj2xdmQTkXMcRi1wdQ0mVfzLTDXgat1SrTgPxR+wwg/izVZa8Xm7I/V51joZubH4SpQ/sq4JgfGLcrQ7ZJaWTp6yAX09zcg1pzwblG2Kwh/sPJ49bO2O34MGlJzyjC0v7aN/MHuAOJYONmk2kKwEVLbvc0DQMzd8ogQYybg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1soOUo-00061m-9o for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 10:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Sep 2024 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73022 X-GNU-PR-Package: emacs Original-Received: via spool by 73022-submit@debbugs.gnu.org id=B73022.172606549823118 (code B ref 73022); Wed, 11 Sep 2024 14:39:02 +0000 Original-Received: (at 73022) by debbugs.gnu.org; 11 Sep 2024 14:38:18 +0000 Original-Received: from localhost ([127.0.0.1]:39353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soOU6-00060o-Cr for submit@debbugs.gnu.org; Wed, 11 Sep 2024 10:38:18 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:35829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soOU4-00060U-2T for 73022@debbugs.gnu.org; Wed, 11 Sep 2024 10:38:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1726065480; x=1726670280; i=rudalics@gmx.at; bh=ncoLq5uwQ6neWh2sEMhFuGkOC5Yf63LXoMWGtBDrEP4=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=RZLC3C2FJ/AmLX20Sh7zq8PHkSB1gtCx0Yq+VDrGcYYCRH9OmaovnEuoz29IgXjP AtToDeg/tvCRA1+hwoAd5azf255F45QrHMJfHv8/KozpjSzaBhfs0XEcp3oAIDjiX 8IOw1EV3RXLHJux8wiDgQaReUQPZ304VexT0E8JKGMCG0O1MtGSMeRSukyMVETk0q dBnAzhkDMI85dRb+iUI/vpMQOSWXX15YUac6NMoNBs4HHC8rSeD2oKtQiPR1Jm/3G SGxWdkMoTxQAJB+oyEvToPEOSu4EmIblkdgOshARd4+kaPgQSvlV6kbDi0PLqmXKh tYYdIzZXB13WoAzukA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.97.126]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N63RQ-1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kA93sVUiQSKp6qEIAEhSyaXBUkmseAMNbsZK9/NeaHS JivCEhdkDBVv6sgyGS4EaMdtRkMOmg7k3YmN1GIqs3i5WQihJAEfhiBzbv9iOMkUCTw7bzxZ 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:291605 Archived-At: >> > For instance, Eli recently added this code (dispnew.c): >> > >> > /* This should never happen, but evidently sometimes does if one >> > resizes the frame quickly enough. Prevent aborts in cmcheckmagic. */ >> > if (vpos >= FRAME_TOTAL_LINES (f)) >> > return; >> > >> > But this is checking the *frame*. Later, the assertion in >> > cmcheckmagic will be made about the *terminal*. >> >> Right. This should probably be >> >> if (FRAME_TERMCAP_P (f) && vpos >= FrameRows (FRAME_TTY (f))) >> return; > > That code is in update_frame_line, which is used only for TTY frames > and uses frame glyph matrices. IOW, it updates the entire frame as a > single large window. In addition, on a TTY terminal there's only one > frame visible at any given time, and only that one frame is being > redrawn, ever. > > Given the above, why is that code incorrect? It _might_ be incorrect when we allow FRAME_TOTAL_LINES (f) to exceed FrameRows (FRAME_TTY (f)) because we refuse to shrink a frame below some height. That's why I used the term "probably". If I knew what that code does in all consequences, I could tell you more. But I don't know. >> And it's not about resizing frames "quickly". Here I can crash it in a >> very slow fashion too. > > Good for you, but my comment describes the situation in which I saw > that particular problem. As I already said, I can never crash Emacs > if I resize the terminal emulator window slowly. And as I already said I can crash Emacs reliably if I slowly shrink the window, slowly expand it again, precisely at the moment it should reshow the minibuffer window. You can ask me any question about the state of the frame and its windows at the time of the crash. > Most probably because the terminal driver simply ignores such writes. > AFAIU, the assertion there is not because of the terminal, it is there > to catch Emacs bugs. Then tell us how to catch it. I'm already out of ideas. martin