From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 15:22:03 +0300 Message-ID: <861q1qpehg.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25050"; mail-complaints-to="usenet@ciao.gmane.io" Cc: n142857@gmail.com, 73022@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 11 14:24:46 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 1soMOq-0006IN-VT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Sep 2024 14:24:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soMNM-0002Ij-Gp; Wed, 11 Sep 2024 08:23:12 -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 1soMN7-0001Kr-MI for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 08:23:01 -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 1soMN6-0008DM-JF for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 08:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=oJxoF/Z+AGwPv0KDytYiHBCqIXhg0q1opSVAw2sIt9U=; b=UphM1QcPvfabK5aGIxHBwDq2aPHQ/5aXOWGiDmi5JAu5tPBQzASGARHXlUEC3xIO5iU3QrGjMYgpiDLei7sTjotNS/or8z3KN+Y/r2w/MxkxUDwXX0HQAM0a5PSlb7OHfm/zKZkUouSvw1hr46fzOEaIPYguPKGp4ucw1JvFcUIIroxPd+wKo8PMAuIMyKaX2/l6E1ONKKktbCrzIOSRLDobkvF33miROGjM29SzujpbBryTTfl5yaydrIpn7SolNdPVSdP18cEQ31O3oF6wud7lG0k2LEeZ0rL4XiULXjLLo1n34vYzJU3gMeCMnH6CQYIHGNCzXU54qO6aPpi+Qw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1soMNB-0007BS-Rl for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 08:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Sep 2024 12:23:01 +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.172605734227566 (code B ref 73022); Wed, 11 Sep 2024 12:23:01 +0000 Original-Received: (at 73022) by debbugs.gnu.org; 11 Sep 2024 12:22:22 +0000 Original-Received: from localhost ([127.0.0.1]:37911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soMMX-0007AY-Mx for submit@debbugs.gnu.org; Wed, 11 Sep 2024 08:22:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soMMV-0007AI-Ag for 73022@debbugs.gnu.org; Wed, 11 Sep 2024 08:22:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1soMMI-00083v-Uo; Wed, 11 Sep 2024 08:22:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oJxoF/Z+AGwPv0KDytYiHBCqIXhg0q1opSVAw2sIt9U=; b=MDiU9DCuRlH2 FPRxkAjMgXr2BlvBdVVJsO4e0o+lruqNeoGBBnKd/bc/PWh0WxPvcWiKzD+RpIoO1MgJ+bbn/JbJ/ KFFyB9r4nnFJ0rgRF6y0RfnTm9sTGPmfwN/xD1d/SyxhAeo5EtY8gglKAWzHpNUt/Mi9zg31RzLHy Wx5ZqNULAjrhx9Bnq6HxPlT1V9Ol2bLyFnjkvxrje5jl3MEt4FQ6YvuZfzNpEpVtI4nvCfCX7M4Kj IidipkuHiscjgiWDW3QLilvpFLjwk4Inw1mvdSvifScRUbI2D5Xe/nqwpBBi3Kv0E+gPH8vYzrk0d TGbV7mmC/TbjTuA2oYKorA==; In-Reply-To: <4c3591f1-7c26-489f-ba68-8586e98cd99e@gmx.at> (message from martin rudalics on Wed, 11 Sep 2024 10:07:21 +0200) 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:291598 Archived-At: > Date: Wed, 11 Sep 2024 10:07:21 +0200 > Cc: Eli Zaretskii , 73022@debbugs.gnu.org > From: martin rudalics > > > 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? > 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. > The cmcheckmagic code is about a very peculiar situation that is hardly > relevant for today's terminals I think. Here I can never crash a build > that doesn't check assertions. 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.