From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex =?UTF-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.bugs Subject: bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related) Date: Tue, 11 May 2021 23:07:01 +0100 Message-ID: <87y2ckgby0.fsf@linaro.org> References: <87tunasd2u.fsf@linaro.org> <83fsyu57oj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15941"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.13; emacs 28.0.50 Cc: 48337@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 12 00:24:12 2021 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 1lganR-0003zO-LZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 00:24:09 +0200 Original-Received: from localhost ([::1]:35056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lganQ-00007r-OX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 18:24:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgaZm-0008DB-6W for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 18:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgaZl-00005h-UP for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 18:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgaZl-0001Xw-Mn for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 18:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex =?UTF-8?Q?Benn=C3=A9e?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 May 2021 22:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48337 X-GNU-PR-Package: emacs Original-Received: via spool by 48337-submit@debbugs.gnu.org id=B48337.16207709655883 (code B ref 48337); Tue, 11 May 2021 22:10:01 +0000 Original-Received: (at 48337) by debbugs.gnu.org; 11 May 2021 22:09:25 +0000 Original-Received: from localhost ([127.0.0.1]:37718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgaZB-0001Wp-GJ for submit@debbugs.gnu.org; Tue, 11 May 2021 18:09:25 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:36539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgaZ7-0001WW-8u for 48337@debbugs.gnu.org; Tue, 11 May 2021 18:09:24 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id m9so21619654wrx.3 for <48337@debbugs.gnu.org>; Tue, 11 May 2021 15:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=EtsXfJY8pcQdBaeOQl7BG8mpVxnNYlYSbphR6cPBwx8=; b=k3aZx7UaJbLX9kbjvrpYlb9ktBCn1bAkMUulOerkK8rOrJg5NgnM01tLzzru3kizMt lL8ZkRWxc/VmboA3gDLwKbVOcaSBTlRaT6KCwKAqGyzK9BhlB781oIWVAC2S8Bme0bWf kXUUk3pLiWKQHjcwkw59/pNkzepRGJeWzghHO4ssk9mnQvOYjKcfYriizQzk50D6K/7j PAXOb6zTzXoJXk/vIikiivTr99+XupjZifJ43rxhiE1Wxk5TlzuTP8otvknAhvSFMIF4 nQ5X1W4ystfFAg07KuaJlcnrsqml83OJMLI5FzLrWjaQjjP8p6rkK3r6heP1YjM5yIIR s+Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=EtsXfJY8pcQdBaeOQl7BG8mpVxnNYlYSbphR6cPBwx8=; b=rsbE6NJhHfirJG/jy6cBnU9EQUHxsK2U7+VzpSi2Ko3HtP9MqiS+Zrs+sfqa1JZrDp KlZt6OzXAhPIvA5OcdAYsm48StwMfvDDH7Ovu7xysjIGM/1PLgry/YD6b8onptGicrQU 3HdEPWP8WHv/t5ZcUpsOusCT8fOyLPIF2v4utUH+Hgg87PWh8Qd3fxsfA3mxJSrSlajX jzv3UdJVX+gUDc6Zccaq4K0EbRk5loGa6bnSRWAL9GEL6cda6Gis44hkN1gKKrmvB9Hq GkDF3s/0D9MQdw1dyA8cxsIN+JNSDVt+c2uRtepffDXshHGSvoESmLve9pj36oQG5QJo OWtg== X-Gm-Message-State: AOAM533BJEqZRdF5tM1NWZM9Nu4Qqnuvt5lGrjLO2iwTgPhR+nP5MeQI jImjDHGgl9I68UVMFHb/me13AbBCPLdFfA== X-Google-Smtp-Source: ABdhPJwdkjlN/mTWRe6QEZ86qJAlyTvoOYKDxNafNrQZj+Cyfn1++sVsNfnhCQlJ1fqixuY8dApB7w== X-Received: by 2002:adf:ef45:: with SMTP id c5mr39771699wrp.78.1620770954605; Tue, 11 May 2021 15:09:14 -0700 (PDT) Original-Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n10sm29579121wrw.37.2021.05.11.15.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 15:09:12 -0700 (PDT) Original-Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 257181FF7E; Tue, 11 May 2021 23:09:11 +0100 (BST) In-reply-to: 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" Xref: news.gmane.io gmane.emacs.bugs:206301 Archived-At: Alan Mackenzie writes: > Hello, Alex. > > On Tue, May 11, 2021 at 07:51:20 +0100, Alex Benn=C3=A9e wrote: >> I can now recreate at will with a magit sequence (l o hackbox/ TAB) which >> triggers a minibuffer re-size to accommodate the list of git branches: > > Could you possibly give us a precise recipe to reproduce this bug, and a > GDB backtrace with Emacs compiled with CFLAGS=3D'-O0 g3' (or similar)? So > much of the needed information in your large dump post has been > optimised away by the compiler. Would you please also make sure that > the Lisp backtrace is at the end of the GDB backtrace. I think this > should happen automatically if you have an Emacs .gdbinit in the > directory where you start GDB from. The later rr dumps have more symbols but didn't have the benefit of the Emacs' .gdbinit Lips backtrace. However I'm fairly confident it's being triggered by doom-modeline: (doom-modeline-def-segment window-number (let ((num (cond ((bound-and-true-p ace-window-display-mode) (aw-update) (window-parameter (selected-window) 'ace-window-path)) ((bound-and-true-p winum-mode) (setq winum-auto-setup-mode-line nil) (winum-get-number-string)) ((bound-and-true-p window-numbering-mode) (window-numbering-get-number-string)) (t "")))) (if (and (< 0 (length num)) (< (if (active-minibuffer-window) 2 1) ; exclude minibuffer (length (cl-mapcan (lambda (frame) ;; Exclude child frames (unless (and (fboundp 'frame-parent) (frame-parent frame)) (window-list))) (visible-frame-list))))) (propertize (format " %s " num) 'face (if (doom-modeline--active) 'doom-modeline-buffer-major-mode 'mode-line-inactive))))) I'll try and get a better capture of it in action next time I restart my Em= acs. > > That Factive_minibuffer_window is throwing an error is mainly because it > is being invalidly called. In particular, the variable minibuf_level > appears to be invalid, as compared with the internal list of > minibuffers. > > Would you please also test my theory of the last paragraph, by applying > the following patch (which reverses Eli's recent patch) and seeing if > the bug still happens. Thanks! > > > > diff --git a/src/minibuf.c b/src/minibuf.c > index 52d1275451..3afba0db68 100644 > --- a/src/minibuf.c > +++ b/src/minibuf.c > @@ -653,6 +653,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, L= isp_Object prompt, > } >=20=20 > minibuf_level++; /* Before calling choose_minibuf_frame. */ > + minibuffer =3D get_minibuffer (minibuf_level); /* Temporary fix, 2021-= 05-11. */ >=20=20 > /* Choose the minibuffer window and frame, and take action on them. */ >=20=20 > @@ -766,7 +767,8 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, L= isp_Object prompt, >=20=20 > /* Switch to the minibuffer. */ >=20=20 > - minibuffer =3D get_minibuffer (minibuf_level); > + /* minibuffer =3D get_minibuffer (minibuf_level); Temporarily moved, > + 2021-05-11. */ > set_minibuffer_mode (minibuffer, minibuf_level); > Fset_buffer (minibuffer); >=20=20 > @@ -969,8 +971,8 @@ is_minibuffer (EMACS_INT depth, Lisp_Object buf) > nth_minibuffer (EMACS_INT depth) > { > Lisp_Object tail =3D Fnthcdr (make_fixnum (depth), Vminibuffer_list); > - if (NILP (tail)) > - return Qnil; > + /* if (NILP (tail)) Temporarily commented out, 2021-05-11 > + return Qnil; */ > return XCAR (tail); > } >=20=20 > > [ .... ] > >> Let me know if you want something else. > > See above. ;-) > > [ .... ] > >> On Tue, 11 May 2021 at 03:24, Eli Zaretskii wrote: > >> > Please show the Lisp value of Vminibuffer_list. > > I have seen the answer to this request. Thanks! > >> --=20 >> Alex Benn=C3=A9e >> KVM/QEMU Hacker for Linaro --=20 Alex Benn=C3=A9e