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#55068: 29.0.50; crashes when trying to set default font Date: Mon, 23 May 2022 16:59:11 +0300 Message-ID: <83wnec5p00.fsf@gnu.org> References: <87pmk4oadj.fsf@no.workgroup> <875ylwpmrn.fsf@gnus.org> <835ylw7amy.fsf@gnu.org> <87ilpwmpej.fsf@gnus.org> <87h75go3c2.fsf@yahoo.com> <87v8twl9nf.fsf@gnus.org> <87leusmnz0.fsf@yahoo.com> <87r14kl934.fsf@gnus.org> <87ee0kmnh9.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36609"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 55068@debbugs.gnu.org, telegraph@gmx.net To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 23 16:00:13 2022 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 1nt8bU-0009EA-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 May 2022 16:00:12 +0200 Original-Received: from localhost ([::1]:40880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nt8bS-0005YQ-Vb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 May 2022 10:00:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt8bK-0005YH-Ua for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 10:00:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nt8bK-0005Ca-BJ for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 10:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nt8bK-0000Lt-9W for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 10:00: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, 23 May 2022 14:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55068 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo confirmed Original-Received: via spool by 55068-submit@debbugs.gnu.org id=B55068.16533143731279 (code B ref 55068); Mon, 23 May 2022 14:00:02 +0000 Original-Received: (at 55068) by debbugs.gnu.org; 23 May 2022 13:59:33 +0000 Original-Received: from localhost ([127.0.0.1]:49880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nt8ar-0000KZ-1d for submit@debbugs.gnu.org; Mon, 23 May 2022 09:59:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nt8ap-0000KJ-2q for 55068@debbugs.gnu.org; Mon, 23 May 2022 09:59:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt8aj-00054X-LU; Mon, 23 May 2022 09:59:25 -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=iammCYQMlpwxFWKX6xfpbd3POZdjLuNF7rZ3ZxUIxzA=; b=rGvyc+GS2dK/ WW2NA69u+pZ4BEDs/0t4Atuabk2y2VdMWcHHWbC8oTcmlOwdcwsYxSNy9VsSua8jY1Dp9rB8wVzQr hrs3NtIKvNPZaDmfNzJb+9kMkVPXWhyWUvVQzzttYT3loZACyxKZrPPIAoUaejeSzxjx6d+AQPaEZ YnGL0tTjs7GxYmj6si9376uLZZg+3HzllAVZe6VfHGn6/YTtS9WVtEfY2Y1r+gNA68jiGpy/AUwzp AY7NOKsMlt7shDRPcTBoROzCIo7KecPkSK/K2Rbx+bkWjJ7dGIeIhoPqgDcJqGdjPGnJuAruuKLqw NFFx5oo4EW+IfpGna2ychg==; Original-Received: from [87.69.77.57] (port=2645 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt8aj-0006Zr-A6; Mon, 23 May 2022 09:59:25 -0400 In-Reply-To: <87ee0kmnh9.fsf@yahoo.com> (message from Po Lu on Mon, 23 May 2022 20:40:02 +0800) 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:232972 Archived-At: > From: Po Lu > Cc: Eli Zaretskii , telegraph@gmx.net, 55068@debbugs.gnu.org > Date: Mon, 23 May 2022 20:40:02 +0800 > > Lars Ingebrigtsen writes: > > > Nope; no crashes with that patch, thanks. > > > > (Side note: It is pretty slow, though -- popping up and closing the menu > > both takes about five seconds on this laptop, so perhaps it should limit > > the number of entries in one way or another. And... the family names > > aren't sorted alphabetically? And it looks like I'm getting several > > instances of each family -- it's so slow that it's a bit painful to > > scroll through, but I'm getting several instances of "Lato", for > > instance, at arbitrary places in the list.) > > Yes, I agree completely. Allocating 20 MB to generate a popup menu also > seems excessive, but we don't have a way of "lazy-loading" menus at > present. > > But for now let's just avoid the crash. I will try to think up > something later that doesn't involve selecting through many different > layers of menus. We have the same problem in other *menu.c files. I fixed w32menu.c, but there are pgtkmenu.c and nsmenu.m as well. As for the rest: font-family-list is quite simple-minded, especially if the frame has more than one font backend defined. IME, to be useful, its output should be run through delete-dups and then sorted.