From: 张云峰 <zhangyunfeng0101@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 65198@debbugs.gnu.org
Subject: bug#65198: 29.1; Emacs29.1 crash in function face_for_font
Date: Fri, 11 Aug 2023 08:15:41 +0800 [thread overview]
Message-ID: <CA+cG9Gw2fOcnV9p08RAiChQj76Q2QmTFUk1mxNJOHNWsFeq2_g@mail.gmail.com> (raw)
In-Reply-To: <831qgaiw2d.fsf@gnu.org>
I've tested this patch, unfortunately, it doesn't work, still crashes
GDB information:
Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x0000555555619516 in produce_glyphless_glyph ()
(gdb) bt
#0 0x0000555555619516 in produce_glyphless_glyph ()
#1 0x0000555555640789 in gui_produce_glyphs ()
#2 0x0000555555623f70 in move_it_in_display_line_to ()
#3 0x000055555562935a in move_it_to ()
#4 0x000055555563e84f in window_text_pixel_size ()
#5 0x000055555563f526 in Fwindow_text_pixel_size ()
#6 0x00007fffe7dc07a8 in
F6669742d6672616d652d746f2d6275666665722d31_fit_frame_to_buffer_1_0 ()
at /home/zayfen/github.com/emacs/src/../native-lisp/29.1.50-9e9f496f/preloaded/window-0d1b8b93-6f4eee58.eln
#7 0x000055555576a032 in funcall_subr ()
#8 0x0000555555766ba1 in Ffuncall ()
#9 0x000055555576aa04 in eval_sub ()
#10 0x000055555576ce6d in FletX ()
#11 0x000055555576aba7 in eval_sub ()
#12 0x000055555576be0d in funcall_lambda ()
#13 0x000055555576c3ee in apply_lambda ()
#14 0x000055555576a49b in eval_sub ()
#15 0x000055555576ce6d in FletX ()
#16 0x000055555576aba7 in eval_sub ()
#17 0x000055555576be0d in funcall_lambda ()
#18 0x000055555576c3ee in apply_lambda ()
#19 0x000055555576a49b in eval_sub ()
#20 0x000055555576ca2d in Flet ()
#21 0x000055555576aba7 in eval_sub ()
#22 0x000055555576aba7 in eval_sub ()
#23 0x000055555576ce6d in FletX ()
#24 0x000055555576aba7 in eval_sub ()
#25 0x000055555576af0d in Fprogn ()
#26 0x000055555576aba7 in eval_sub ()
#27 0x000055555576aba7 in eval_sub ()
#28 0x000055555576be0d in funcall_lambda ()
#29 0x000055555576c3ee in apply_lambda ()
#30 0x000055555576a49b in eval_sub ()
#31 0x000055555576aba7 in eval_sub ()
#32 0x000055555576af0d in Fprogn ()
#33 0x000055555576aba7 in eval_sub ()
#34 0x000055555576aba7 in eval_sub ()
#35 0x000055555576ce6d in FletX ()
#36 0x000055555576aba7 in eval_sub ()
#37 0x000055555576af0d in Fprogn ()
#38 0x000055555575666c in Fsave_current_buffer ()
#39 0x000055555576aba7 in eval_sub ()
#40 0x000055555576aba7 in eval_sub ()
#41 0x000055555576ce6d in FletX ()
#42 0x000055555576aba7 in eval_sub ()
#43 0x000055555576ce6d in FletX ()
#44 0x000055555576aba7 in eval_sub ()
#45 0x000055555576be0d in funcall_lambda ()
#46 0x000055555576c3ee in apply_lambda ()
#47 0x000055555576a49b in eval_sub ()
#48 0x000055555576d66b in Feval ()
#49 0x000055555576ace1 in eval_sub ()
Eli Zaretskii <eliz@gnu.org> 于2023年8月11日周五 02:36写道:
>
> > From: 张云峰 <zhangyunfeng0101@gmail.com>
> > Date: Fri, 11 Aug 2023 01:58:34 +0800
> > Cc: 65198@debbugs.gnu.org
> >
> > 2023-08-11_01-53.png
> > when popup frame has the warning-icon (marked in picture) , emacs will crash immediately.
>
> Can you try the patch below and see if it prevents the crash in these
> cases?
>
> diff --git a/src/xdisp.c b/src/xdisp.c
> index 9cddcfe..b25bdc7 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -8312,9 +8312,14 @@ get_next_display_element (struct it *it)
> && success_p
> && FRAME_WINDOW_P (it->f))
> {
> - struct face *face = FACE_FROM_ID (it->f, it->face_id);
> + struct face *face = FACE_FROM_ID_OR_NULL (it->f, it->face_id);
>
> - if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0)
> + if (!face)
> + {
> + it->what = IT_GLYPHLESS;
> + it->glyphless_method = GLYPHLESS_DISPLAY_EMPTY_BOX;
> + }
> + else if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0)
> {
> /* Automatic composition with glyph-string. */
> Lisp_Object gstring = composition_gstring_from_id (it->cmp_it.id);
next prev parent reply other threads:[~2023-08-11 0:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 9:57 bug#65198: 29.1; Emacs29.1 crash in function face_for_font 张云峰
2023-08-10 10:06 ` Eli Zaretskii
[not found] ` <CA+cG9GxATqwi7-aFEvma0zi3AZM5y6eshU510oPFohuKwhHF4w@mail.gmail.com>
2023-08-10 17:22 ` Eli Zaretskii
2023-08-10 17:58 ` 张云峰
2023-08-10 18:36 ` Eli Zaretskii
2023-08-11 0:15 ` 张云峰 [this message]
2023-08-11 0:50 ` 张云峰
2023-08-11 6:12 ` Eli Zaretskii
2023-08-11 14:21 ` 张云峰
2023-08-11 14:55 ` 张云峰
2023-08-11 15:30 ` Eli Zaretskii
2023-08-11 16:14 ` 张云峰
2023-08-12 6:39 ` Eli Zaretskii
2023-08-11 15:24 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+cG9Gw2fOcnV9p08RAiChQj76Q2QmTFUk1mxNJOHNWsFeq2_g@mail.gmail.com \
--to=zhangyunfeng0101@gmail.com \
--cc=65198@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.