From: "Alex Bennée" <alex.bennee@linaro.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 48337@debbugs.gnu.org
Subject: bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related)
Date: Tue, 11 May 2021 23:07:01 +0100 [thread overview]
Message-ID: <87y2ckgby0.fsf@linaro.org> (raw)
In-Reply-To: <YJrlt+CkK9Sjbmla@ACM>
Alan Mackenzie <acm@muc.de> writes:
> Hello, Alex.
>
> On Tue, May 11, 2021 at 07:51:20 +0100, Alex Bennée 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='-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 Emacs.
>
> 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, Lisp_Object prompt,
> }
>
> minibuf_level++; /* Before calling choose_minibuf_frame. */
> + minibuffer = get_minibuffer (minibuf_level); /* Temporary fix, 2021-05-11. */
>
> /* Choose the minibuffer window and frame, and take action on them. */
>
> @@ -766,7 +767,8 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
>
> /* Switch to the minibuffer. */
>
> - minibuffer = get_minibuffer (minibuf_level);
> + /* minibuffer = get_minibuffer (minibuf_level); Temporarily moved,
> + 2021-05-11. */
> set_minibuffer_mode (minibuffer, minibuf_level);
> Fset_buffer (minibuffer);
>
> @@ -969,8 +971,8 @@ is_minibuffer (EMACS_INT depth, Lisp_Object buf)
> nth_minibuffer (EMACS_INT depth)
> {
> Lisp_Object tail = 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);
> }
>
>
> [ .... ]
>
>> Let me know if you want something else.
>
> See above. ;-)
>
> [ .... ]
>
>> On Tue, 11 May 2021 at 03:24, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > Please show the Lisp value of Vminibuffer_list.
>
> I have seen the answer to this request. Thanks!
>
>> --
>> Alex Bennée
>> KVM/QEMU Hacker for Linaro
--
Alex Bennée
next prev parent reply other threads:[~2021-05-11 22:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87tunasd2u.fsf@linaro.org>
2021-05-10 19:30 ` bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related) Alex Bennée
2021-05-10 19:34 ` bug#48337: Alex Bennée
2021-05-11 2:24 ` bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related) Eli Zaretskii
2021-05-11 6:51 ` Alex Bennée
2021-05-11 8:23 ` Alex Bennée
2021-05-11 8:54 ` Alex Bennée
2021-05-11 12:21 ` Eli Zaretskii
2021-05-11 12:54 ` Alex Bennée
2021-05-11 13:42 ` Eli Zaretskii
2021-05-11 13:47 ` Eli Zaretskii
2021-05-11 19:45 ` Alan Mackenzie
2021-05-11 19:55 ` Eli Zaretskii
2021-05-12 18:54 ` Alan Mackenzie
2021-05-13 7:54 ` martin rudalics
2021-05-13 9:52 ` Alan Mackenzie
2021-05-13 11:54 ` Alan Mackenzie
2021-05-13 12:09 ` Alan Mackenzie
2021-05-14 15:20 ` Gregory Heytings
2021-05-14 16:05 ` Eli Zaretskii
2021-05-14 17:31 ` Gregory Heytings
2021-05-14 18:19 ` Eli Zaretskii
2021-05-15 9:45 ` Gregory Heytings
2021-05-11 20:14 ` Alan Mackenzie
2021-05-11 22:07 ` Alex Bennée [this message]
2021-05-14 16:31 ` Alan Mackenzie
2021-05-14 16:52 ` Alex Bennée
2021-05-14 18:40 ` Alan Mackenzie
2021-05-14 22:35 ` Alex Bennée
2021-05-15 12:00 ` Alan Mackenzie
2021-05-16 14:24 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2ckgby0.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=48337@debbugs.gnu.org \
--cc=acm@muc.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).