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#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Date: Mon, 09 Oct 2023 14:24:54 +0300 Message-ID: <83mswsvy0p.fsf@gnu.org> References: <865y3gq2in.fsf@lan> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21098"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66416@debbugs.gnu.org To: Yuchen Guo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 09 13:27:00 2023 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 1qpoPc-0005FO-6r for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Oct 2023 13:27:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpoPT-0005VW-Ar; Mon, 09 Oct 2023 07:26:53 -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 1qpoPL-0005VM-OE for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 07:26:43 -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 1qpoPK-000095-5W for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 07:26:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpoPe-0005Bq-EK for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 07:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Oct 2023 11:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66416 X-GNU-PR-Package: emacs Original-Received: via spool by 66416-submit@debbugs.gnu.org id=B66416.169685076919868 (code B ref 66416); Mon, 09 Oct 2023 11:27:02 +0000 Original-Received: (at 66416) by debbugs.gnu.org; 9 Oct 2023 11:26:09 +0000 Original-Received: from localhost ([127.0.0.1]:59420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpoOm-0005AO-Oc for submit@debbugs.gnu.org; Mon, 09 Oct 2023 07:26:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpoOi-00059p-1L for 66416@debbugs.gnu.org; Mon, 09 Oct 2023 07:26:07 -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 1qpoOI-0008Sf-0q; Mon, 09 Oct 2023 07:25:38 -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=phTjKvC1EqQCOfS8LUxSKLxAoquWyXMLMzwfeOykms0=; b=fc1oI/JOZa0L mu7z/i9igeVyVbudbuw26KON0202aYIuoSC5zmR7Z88UmuqUq6lbp3ABpM3jx0pAS/y4Jvi6Cw8M9 ZORF+2kM3SGSZ5r5v4npWDI3FYuYm9nl7viM+2j8Nf+zAjZIOTA+zxf9kC4i89m/hZWp+mjX8jUrv hEUq6cMIJNLrUvLtYF7s9I5nijfCZtBGUAvkxnYzh6VQuZkKGzf6YB01/HEaf3cvtMryjsyWuwf3O scobw4z5IXLvJqJNWrHdzDQH3B9Wha9DkDNddX7cf85y2OvgnwR7AEyYUZ3TYoudl1hdwrbm5xv9K eUejZ7TFoUXXvGC0rs5FiQ==; In-Reply-To: <865y3gq2in.fsf@lan> (message from Yuchen Guo on Sun, 08 Oct 2023 20:32:00 +0000) 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:272144 Archived-At: > From: Yuchen Guo > Date: Sun, 08 Oct 2023 20:32:00 +0000 > > > Emacs occasionally crashes when displaying multi-lingual text. It has > crashed several times in the last few days, such as visiting HELLO file > or browsing a web page with eww. Sometime it crashes immediately when > the HELLO file is visited, other times it crashes when I scroll the > screen. > > Worth mentioning is that, to deal with font fallback, I have configured > a custom fontset: > https://codeberg.org/m0p/dotfiles/raw/commit/62d1a6008c0e391a33239a809aee92e4c03f14b5/imports/not-nix-config-files/emacs-init.el Regardless of our attempts to understand the immediate reason(s) for these crashes and try preventing them, your setup, viz.: (create-fontset-from-fontset-spec ;; derived from standard-fontset-spec "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-custom") (setq my-font-list '("NewComputerModernMono10" "STIX Two Math" "Noto Sans Mono CJK SC")) (dolist (font my-font-list) (set-fontset-font "fontset-custom" 'unicode (font-spec :name font) nil 'append)) (add-to-list 'default-frame-alist '(font . "fontset-custom")) is not a good idea, to say the least. Since 'unicode' is a script that includes all the characters supported by Emacs, the above basically tells Emacs that each of the 3 fonts you name support the entire Unicode range of characters, and that cannot be right. The correct way of customizing your fonts is set a single ASCII-compatible font as the default font (in your case, this is probably NewComputerModernMono10), and then use set-fontset-font to add the other two fonts for specific scripts or ranges of character codepoints, not for the entire Unicode space. For each such font use only the range of characters that it supports well, and that other fonts don't cover or cover less well.