Subject: Re: bug#65198: 29.1; Emacs29.1 crash in function face_for_font

From: 张云峰 <[email-masked]>
Date: Fri, 11 Aug 2023 01:58:34 +0800

when popup frame has the warning-icon (marked in picture) , emacs will
crash immediately.

Eli Zaretskii <[email-masked]> 于2023年8月11日周五 01:22写道：

> > From: 张云峰 <[email-masked]>
> > Date: Thu, 10 Aug 2023 22:56:23 +0800
> >
> > finally  I fix this bug by removing a piece of code:
> >
> > (defun +set-chinese-font()
> >   (interactive)
> >   (set-fontset-font
> >    t
> >    'han
> >    (cond
> >     ((string-equal system-type "windows-nt")
> >      (cond
> >       ((member "Microsoft YaHei" (font-family-list)) "Microsoft YaHei")
> >       ((member "Microsoft JhengHei" (font-family-list)) "Microsoft
> JhengHei")
> >       ((member "SimHei" (font-family-list)) "SimHei")))
> >     ((string-equal system-type "darwin")
> >      (cond
> >       ((member "Hei" (font-family-list)) "Hei")
> >       ((member "Heiti SC" (font-family-list)) "Heiti SC")
> >       ((member "Heiti TC" (font-family-list)) "Heiti TC")))
> >     ((string-equal system-type "gnu/linux")
> >      (cond
> >       ((member "WenQuanYi Micro Hei" (font-family-list)) "WenQuanYi
> > Micro Hei"))))))
> >
> > (add-hook 'buffer-list-update-hook '+set-chinese-font)
>
> I guess one of these fonts is faulty in some way?  Or maybe you have
> neither of these fonts on that system, which would effectively specify
> that characters of the han script have no font at all?  Of course,
> normally the latter should just cause the han characters to display as
> hex codes, not to cause crashes...
>
> Are you saying that just having the above in your customization and
> typing some Han character causes Emacs to crash?
>
> P.S. And please use Reply All to reply, so that the bug address is
> kept on the CC list.
>