From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Michael Schierl , 3208@debbugs.gnu.org Resent-From: Michael Schierl Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 04 May 2009 18:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3208 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124146159322660 (code B ref -1); Mon, 04 May 2009 18:35:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 4 May 2009 18:26:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.6 required=4.0 tests=FOURLA,MDO_CABLE_TV3 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n44IQSaK022652 for ; Mon, 4 May 2009 11:26:29 -0700 Received: from mail.gnu.org ([199.232.76.166]:49348 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M12rz-0006da-HS for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 14:26:27 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M12ry-0008Bn-17 for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 14:26:27 -0400 Received: from mail.gmx.net ([213.165.64.20]:48443) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M12rx-0008Ay-Dj for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 14:26:25 -0400 Received: (qmail invoked by alias); 04 May 2009 18:26:21 -0000 Received: from p549BC434.dip.t-dialin.net (EHLO [192.168.0.201]) [84.155.196.52] by mail.gmx.net (mp032) with SMTP; 04 May 2009 20:26:21 +0200 X-Authenticated: #13243522 X-Provags-ID: V01U2FsdGVkX1+4eoxdUPm47ilb5YlO2g3q8ATeUuOtVTudGIvoWF hSfkJ0771hPZUM Message-ID: <49FF3340.2040008@gmx.de> Date: Mon, 04 May 2009 20:26:08 +0200 From: Michael Schierl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: emacs-pretest-bug@gnu.org X-Enigmail-Version: 0.95.7 OpenPGP: id=58B48CDD Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please describe exactly what actions triggered the bug and the precise symptoms of the bug: - It is easier if you have one of the fonts Code2000 or Arial Unicode installed. I tried it with fonts that come with Windows XP (like Lucida Sans Unicode) but did not succeed in reproducing the bug. It might happen with other fonts as well, most likely ones that have lots of glyphs. - You need to know a character that is in your font but not in the default font (0x2203 works for both Arial Unicode and Code2000, 0x2202 would work for Lucida Sans Unicode, 0xFFFD works for Arial Unicode). - Start emacs -Q - Insert a few thousand characters of that kind, and move to the beginning and to the end of the buffer repeatedly. At first you receive warnings like "Emergency (alloc): Warning: past 95% of memory limit", then the memory is exhausted, and if you still go on, you will be asked if you want to debug Emacs. This is perfectly reproducable for me, both on my main machine and on a freshly installed WinXP virtual machine where I only added Emacs and one of the fonts. You can use code like this to insert the characters: like (let ((str (char-to-string (decode-char 'ucs #x2203)))) (dotimes (i 16) (setq str (concat str str))) (insert str) (goto-char (point-min)) (goto-char (point-max)) (goto-char (point-min)) (goto-char (point-max)) (goto-char (point-min)) (goto-char (point-max))) In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600) of 2009-05-02 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: DEU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-y C-x C-e M-x r e p o r t - e m a Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. 65903 From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 05 May 2009 15:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124153717027699 (code B ref 3208); Tue, 05 May 2009 15:30:03 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 5 May 2009 15:26:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=HAS_BUG_NUMBER,MDO_CABLE_TV3 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f205.google.com (mail-bw0-f205.google.com [209.85.218.205]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n45FQ15r027665 for <3208@emacsbugs.donarmstrong.com>; Tue, 5 May 2009 08:26:03 -0700 Received: by bwz1 with SMTP id 1so5459212bwz.1 for <3208@emacsbugs.donarmstrong.com>; Tue, 05 May 2009 08:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=1pVR8xFhldCbQ0ylr7FB0UxXZTrfX2iBjfQs5dAwZrg=; b=Efh37Eagq7UgKwATQJasd208DfIrhj03hWubiiyM+kvWpIJrfPUexl0LKG+fuQlCDe iLWVZN/KcpUe24M6BJi+N9V2L6QSGBva/XMW4vArFjItw4p5rA/BAVWVZi2I2TwncSdz c/Jl+AIR9YRnFG52Bz8X3OT6RQsbLnutUwOCM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=DMOVbY0t4taTE1tPUYP2KFSg5ywLC+NxlO7WsZAbZs2iNEcKFEjJsjpw+iob6xJ+s+ ds7lM1xNe9uC54iVaMftELLPdYln1sYXsWo66yzD0O5h4S4UPU61wv1Ppu3sSJCYwkW2 seNaRlp5MfOgNQjITacfW7H2jpbgVvHTEp7x0= Received: by 10.142.174.18 with SMTP id w18mr65839wfe.55.1241537154466; Tue, 05 May 2009 08:25:54 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.236.118]) by mx.google.com with ESMTPS id 24sm3040175wfc.37.2009.05.05.08.25.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 May 2009 08:25:54 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A005A64.5050908@gnu.org> Date: Tue, 05 May 2009 23:25:24 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Michael Schierl , 3208@debbugs.gnu.org References: <49FF3340.2040008@gmx.de> In-Reply-To: <49FF3340.2040008@gmx.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Michael Schierl wrote: > - It is easier if you have one of the fonts Code2000 or Arial Unicode > installed. I tried it with fonts that come with Windows XP (like > Lucida Sans Unicode) but did not succeed in reproducing the bug. > It might happen with other fonts as well, most likely ones that have > lots of glyphs. > - You need to know a character that is in your font but not in the > default font (0x2203 works for both Arial Unicode and Code2000, 0x2202 > would work for Lucida Sans Unicode, 0xFFFD works for Arial Unicode). > - Start emacs -Q > - Insert a few thousand characters of that kind, and move to the > beginning and to the end of the buffer repeatedly. At first you > receive warnings like "Emergency (alloc): Warning: past 95% of memory > limit", then the memory is exhausted, and if you still go on, you will > be asked if you want to debug Emacs. This is perfectly reproducable > for me, both on my main machine and on a freshly installed WinXP > virtual machine where I only added Emacs and one of the fonts. > I can reproduce this. The malloc warnings always seem to occur in the SAFE_ALLOCA call in font_sort_entities. The vec passed in to that function contains all the fonts on my system, and len is over 3000, requiring 24kB to be allocated. There appear to be two bugs here. One is that this function is being called all the time when we have already found a font for the character we added to the buffer. The other is that SAFE_FREE does not appear to call xfree to free the memory that SAFE_ALLOCA allocated with xmalloc. Maybe SAFE_ALLOCA is not used often to allocate more than 16kB (the threshold for using the heap instead of the stack) so this has gone unnoticed in the past. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 05 May 2009 15:55:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.12415384371160 (code B ref 3208); Tue, 05 May 2009 15:55:05 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 5 May 2009 15:47:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.239]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n45FlDVF001154 for <3208@emacsbugs.donarmstrong.com>; Tue, 5 May 2009 08:47:14 -0700 Received: by rv-out-0506.google.com with SMTP id f9so3539899rvb.1 for <3208@emacsbugs.donarmstrong.com>; Tue, 05 May 2009 08:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=zRAcbmXFHBTZqIS0ksfuLK/wMoB43mQNo5kGzU6X+o0=; b=v+/ZnZVIvtLQQiC1UOesWy3nuzwgnkcUKYwIoHIXdG7LtIno1B8/JkH+npMeZMNvvt vjbgWzxMfxu8HK4zUzGDWqPR3HMzUqO42T6eQX1na/ES03+4kdxGEj89KbASSmoFbe4W aayAy7fQIOju7Qdm/g7CXxpszvIbi3l7Hz/78= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=koeUe6uSYWV0au/Ogy7id6pWUXweXnlAAkaehE+Mgc36yG5CfjG3kUSJGOuk/99qBn d34LPfMzRpL43aix9K+3jnQeR10oFxXTJH6TlXPJREnTTCjAxJDLnMV7EjIH4hOfDX6A KqI9c5cfFrRmSdX+EWliOSmcU7x2vm6fataUg= Received: by 10.114.131.11 with SMTP id e11mr109555wad.75.1241538433295; Tue, 05 May 2009 08:47:13 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.236.118]) by mx.google.com with ESMTPS id v25sm11660523wah.32.2009.05.05.08.47.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 May 2009 08:47:12 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A005F64.5060803@gnu.org> Date: Tue, 05 May 2009 23:46:44 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: 3208@debbugs.gnu.org CC: Michael Schierl References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> In-Reply-To: <4A005A64.5050908@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Jason Rumney wrote: > The other is that SAFE_FREE does not appear to call xfree to free the > memory that SAFE_ALLOCA allocated with xmalloc. Maybe SAFE_ALLOCA is > not used often to allocate more than 16kB (the threshold for using the > heap instead of the stack) so this has gone unnoticed in the past. I take that back, xfree is called from safe_alloca_unwind, the memory leak lies elsewhere. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Chong Yidong , 3208@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 06 May 2009 23:20:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.12416515124114 (code B ref 3208); Wed, 06 May 2009 23:20:06 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 6 May 2009 23:11:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.4 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n46NBngd004106 for <3208@emacsbugs.donarmstrong.com>; Wed, 6 May 2009 16:11:50 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 9B83957E25C; Wed, 6 May 2009 19:11:57 -0400 (EDT) From: Chong Yidong To: Jason Rumney Cc: Michael Schierl , 3208@debbugs.gnu.org Date: Wed, 06 May 2009 19:11:57 -0400 Message-ID: <87iqkdj076.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I can reproduce this. The malloc warnings always seem to occur in the > SAFE_ALLOCA call in font_sort_entities. The vec passed in to that > function contains all the fonts on my system, and len is over 3000, > requiring 24kB to be allocated. FWIW, I can't reproduce this on GNU/Linux. My default font is DejaVu Sans Mono, and I tried following the recipe by inserting 0x2203 (which displays in Kochi Gothic) repeatedly, and moving to the beginning and to the end of the buffer repeatedly. font_sort_entities is called a few times initially when I insert 0x2203, but it is not called repeatedly thereafter. Could you try to debug why font_sort_entities is called repeatedly in your case? From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 19 May 2009 02:20:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124269920416743 (code B ref 3208); Tue, 19 May 2009 02:20:05 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 19 May 2009 02:13:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MDO_CABLE_TV3,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4J2DJDb016736 for <3208@emacsbugs.donarmstrong.com>; Mon, 18 May 2009 19:13:21 -0700 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n4J2DIEG009718; Tue, 19 May 2009 11:13:18 +0900 (JST) env-from (handa@m17n.org) Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n4J2DIqr018907; Tue, 19 May 2009 11:13:18 +0900 (JST) env-from (handa@m17n.org) Received: by smtp2.aist.go.jp with ESMTP id n4J2DGNt014981; Tue, 19 May 2009 11:13:16 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1M6Epf-0003UC-Jj; Tue, 19 May 2009 11:13:31 +0900 From: Kenichi Handa To: Jason Rumney , 3208@debbugs.gnu.org CC: schierlm@gmx.de In-reply-to: <4A005A64.5050908@gnu.org> (message from Jason Rumney on Tue, 05 May 2009 23:25:24 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> Message-Id: Date: Tue, 19 May 2009 11:13:31 +0900 In article <4A005A64.5050908@gnu.org>, Jason Rumney writes: > Michael Schierl wrote: > > - It is easier if you have one of the fonts Code2000 or Arial Unicode > > installed. I tried it with fonts that come with Windows XP (like > > Lucida Sans Unicode) but did not succeed in reproducing the bug. > > It might happen with other fonts as well, most likely ones that have > > lots of glyphs. > > - You need to know a character that is in your font but not in the > > default font (0x2203 works for both Arial Unicode and Code2000, 0x2202 > > would work for Lucida Sans Unicode, 0xFFFD works for Arial Unicode). > > - Start emacs -Q > > - Insert a few thousand characters of that kind, and move to the > > beginning and to the end of the buffer repeatedly. At first you > > receive warnings like "Emergency (alloc): Warning: past 95% of memory > > limit", then the memory is exhausted, and if you still go on, you will > > be asked if you want to debug Emacs. This is perfectly reproducable > > for me, both on my main machine and on a freshly installed WinXP > > virtual machine where I only added Emacs and one of the fonts. > > > I can reproduce this. The malloc warnings always seem to occur in the > SAFE_ALLOCA call in font_sort_entities. The vec passed in to that > function contains all the fonts on my system, and len is over 3000, > requiring 24kB to be allocated. There appear to be two bugs here. > One is that this function is being called all the time when we have > already found a font for the character we added to the buffer. Oops, I've just fixed this typo: font_sort_entites -> font_sort_entities Anyway, font_sort_entities is called from font_find_for_lface (via font_select_entity). Could you please find why font_find_for_lface is called so releatedly by setting breakpoint in fontset_find_font (with condition "c == 0x2203)? > The other is that SAFE_FREE does not appear to call xfree to free the > memory that SAFE_ALLOCA allocated with xmalloc. Maybe SAFE_ALLOCA is not > used often to allocate more than 16kB (the threshold for using the heap > instead of the stack) so this has gone unnoticed in the past. SAFE_FREE surely calls xfree via unbind_to because SAFE_ALLOCA calls record_unwind_protect with safe_alloca_unwind. --- Kenichi Handa handa@m17n.org From jasonrumney@gmail.com Mon May 25 14:49:43 2009 Received: (at control) by emacsbugs.donarmstrong.com; 25 May 2009 21:49:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-pz0-f190.google.com (mail-pz0-f190.google.com [209.85.222.190]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4PLndmX015564 for ; Mon, 25 May 2009 14:49:40 -0700 Received: by pzk28 with SMTP id 28so2724298pzk.19 for ; Mon, 25 May 2009 14:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=vozS6nI8bVpXu6MJZjwPMcOWBAh889c46jBYS8j+uJA=; b=BASaXwx2vpUEvqGExRCfWRrRmoHat+0XNIutOg4P7FibhlMP2nXRkbVtZZVCxzKU/0 nMKnpBTZKh/GbZFwC3Z/gwDxjpS7GBdIIxK1KNV1lRKjRFZPQrA7f6BVJEN8wSxcqmbE fLQiq7HiNFx9uc5BrkACmoPDd0FrM8MYJ6Nwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=jTtCB02XxPJ8mWrK8UYIuhum76y4FcQ3mbkWJgHp51bqYYPh7PsR5Q8UR1kwgzCi82 MUovUtV/1ifpOgy8zU+0p8Uwcj/IrTgo9WYvxihb1xKsNZqV7BaKka4xhs4Ezo7FJYGm cmfdA0knkXCng8w3td5HVnlR+FaQN+re15U0U= Received: by 10.142.51.4 with SMTP id y4mr2257299wfy.131.1243258811129; Mon, 25 May 2009 06:40:11 -0700 (PDT) Received: from ?192.168.249.26? ([124.13.7.47]) by mx.google.com with ESMTPS id 29sm1612367wfg.28.2009.05.25.06.40.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 25 May 2009 06:40:10 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A1A9F9A.4080207@gnu.org> Date: Mon, 25 May 2009 21:39:38 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Emacs bug Tracking System Subject: serious bug Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit reassign 3208 emacs,w32 severity 3208 important From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Thu, 18 Jun 2009 05:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124530303527730 (code B ref 3208); Thu, 18 Jun 2009 05:35:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 18 Jun 2009 05:30:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, RCVD_IN_NIX1,RCVD_IN_SBLXBL,RCVD_IN_SBLXBL_CBL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-pz0-f203.google.com (mail-pz0-f203.google.com [209.85.222.203]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5I5UUZr027531 for <3208@emacsbugs.donarmstrong.com>; Wed, 17 Jun 2009 22:30:31 -0700 Received: by pzk41 with SMTP id 41so741091pzk.19 for <3208@emacsbugs.donarmstrong.com>; Wed, 17 Jun 2009 22:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=g4zsl0jCQyCY8NcthHZkD4rnQEpf+6VYGkQQKZ+8Euw=; b=TkUt1eLcixc5MdmaPxRYuBzO8+6a37a3gxPgBw1wPm4yxagvQMVWcvAqhmgTK4avBP dHiiU96RKiJcaHFgB5w3uyIcQruBiUTe62VXc5GHtKrrqMqIWsG8+n+D25ErylBFBK2D 696PZcBiKzecwCilMo+QYcWpVxVLe2J5ix+zk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=t7uC0mlHn6F7FCluIiwz0mPNjYp7ARFedU/TNoAH+OWgeen4+TZnRM0E+uyc+yyVDI HYIpXV4ix0Weo4Z0QHl9qkGesFs4FyFTx6YCpx5erdyF/Rb0YfSjk4JRhIm2scRNqwWq Twoj0KCarXJvViUYudYQoaTfoLwAV+ptW37mA= Received: by 10.114.182.1 with SMTP id e1mr1481489waf.141.1245303024701; Wed, 17 Jun 2009 22:30:24 -0700 (PDT) Received: from ?10.1.1.112? ([61.4.103.130]) by mx.google.com with ESMTPS id v9sm2671140wah.36.2009.06.17.22.30.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Jun 2009 22:30:23 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A39D0CC.70707@gnu.org> Date: Thu, 18 Jun 2009 13:29:48 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: 3208@debbugs.gnu.org, schierlm@gmx.de References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > Anyway, font_sort_entities is called from > font_find_for_lface (via font_select_entity). > > Could you please find why font_find_for_lface is called so > releatedly by setting breakpoint in fontset_find_font (with > condition "c == 0x2203)? > I am still investigating this, but I've found that the problem is specific to the uniscribe font backend on Windows. I couldn't find the root cause by debugging, so I am now trying profiling to narrow the search. With uniscribe font backend enabled, font_load_for_lface gets called 124k times from 165k calls to fontset_find_font before the memory overflow. The glyph that gets displayed is a double-width katakana YO from MS Mincho font (it seems the font defines the same glyph to be used for mathematical THERE EXISTS). With only the gdi font backend enabled, font_load_for_lface gets called only once from 399k calls to fontset_find_font, but the default Courier New font is used to display the characters even though it does not contain a glyph (so the default empty box glyph is displayed). From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Mon, 22 Jun 2009 05:55:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124564971810650 (code B ref 3208); Mon, 22 Jun 2009 05:55:05 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 22 Jun 2009 05:48:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, RCVD_IN_NIX1 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-yx0-f197.google.com (mail-yx0-f197.google.com [209.85.210.197]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M5mX4k010642 for <3208@emacsbugs.donarmstrong.com>; Sun, 21 Jun 2009 22:48:34 -0700 Received: by yxe35 with SMTP id 35so149617yxe.19 for <3208@emacsbugs.donarmstrong.com>; Sun, 21 Jun 2009 22:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=pY3RDMd6EmOtKyZ8MoIWwj64msz24O2U66mETL8ZoVc=; b=MRNWKTcgjadxC+v9kLlfwB3kJawgizCOpWEC7slgBZN831YocwU+kHOKjlzeWGRsct 4N9xa67NkydaESqsuBVsL3CMXp0h771rmHjR0cAHAe8DT80Nj86YKSolmjVbb901fs45 mRlO96WxufOwvkEDr4BYYgx65TcOW2M5sz/vY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=nPldTFR+GurbGA4lv1g7QDQHhqP1ZextZnz/HrKxDTlkPQKsZT/g2yhdUAlO0ArukV ASyGwdiMRIbUxyENl/Hxfd6TrnrwioWBZ7X1RXb6pxdMmmEthDbvkglTIp0mJH6LCOtr HvOnFddNQfr+kAqkz/G6M9f5IHe/7yRp4HHS8= Received: by 10.90.87.19 with SMTP id k19mr4930869agb.39.1245649707940; Sun, 21 Jun 2009 22:48:27 -0700 (PDT) Received: from ?10.1.1.112? ([61.4.103.130]) by mx.google.com with ESMTPS id 9sm3918477agb.75.2009.06.21.22.48.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 21 Jun 2009 22:48:26 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A3F1B05.7030105@gnu.org> Date: Mon, 22 Jun 2009 13:47:49 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: 3208@debbugs.gnu.org, schierlm@gmx.de References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > Could you please find why font_find_for_lface is called so > releatedly by setting breakpoint in fontset_find_font (with > condition "c == 0x2203)? > What appears to be happening, is that font_find_for_lface is returning many fonts that match the requested spec, but do not contain the character required. Because has_char is effectively not implemented in the w32 backends, this isn't detected until late, and the negative result is either not cached, or is cached according to the original font spec which many unusable fonts match. On subsequent calls, all the checking to see which fonts really contain the character required is repeated. On first call to fontset_find_font: fontset_get_font_group returns nil (no spec in fontset) Second call (with default fontset): fontset_get_font_group returns a single spec matching registry "iso10646-1", script "symbol" font_find_for_lface returns the font "Lucida Console", which does not contain the desired character. Third call (with fallback): font_find_for_lface returns "Courier New", with registry "iso8859-1" then nil Forth call (with fallback): font_find_for_lface returns nil .... eventually font_find_for_lface returns "MS Mincho" with registry "jisx0208", which does contain the corresponding character (albiet double width, looking suspiciously like katakana YO and not encodable by jisx0208). There may be an incompatibility in the w32 font handling here, because all truetype fonts are effectively unicode fonts, but we return them when other registries that the font can manage are requested. This is because Emacs requests iso8859-1 and other 8-bit registries before requesting iso10646-1, and if we only return bitmap fonts for those we will end up with an ugly display by default. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Mon, 22 Jun 2009 11:25:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.12456697667685 (code B ref 3208); Mon, 22 Jun 2009 11:25:07 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 22 Jun 2009 11:22:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MBMeA5007674 for <3208@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 04:22:42 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5MBMcuS027899; Mon, 22 Jun 2009 20:22:38 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5MBMcjC000858; Mon, 22 Jun 2009 20:22:38 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n5MBMcZI016471; Mon, 22 Jun 2009 20:22:38 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MIhbi-0003zl-1D; Mon, 22 Jun 2009 20:22:38 +0900 From: Kenichi Handa To: Jason Rumney CC: 3208@debbugs.gnu.org, schierlm@gmx.de In-reply-to: <4A3F1B05.7030105@gnu.org> (message from Jason Rumney on Mon, 22 Jun 2009 13:47:49 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> Message-Id: Date: Mon, 22 Jun 2009 20:22:38 +0900 In article <4A3F1B05.7030105@gnu.org>, Jason Rumney writes: > What appears to be happening, is that font_find_for_lface is returning > many fonts that match the requested spec, but do not contain the > character required. Because has_char is effectively not implemented in > the w32 backends, this isn't detected until late, and the negative > result is either not cached, or is cached according to the original font > spec which many unusable fonts match. On subsequent calls, all the > checking to see which fonts really contain the character required is > repeated. That will lead to slow display, but I don't understand why that leads to memory full problem. How many fonts do people have on Windows roughly? On GNU/Linux, I have about 700 fontconfig fonts and 4500 X fonts. > On first call to fontset_find_font: > fontset_get_font_group returns nil (no spec in fontset) > Second call (with default fontset): > fontset_get_font_group returns a single spec matching registry > "iso10646-1", script "symbol" > font_find_for_lface returns the font "Lucida Console", which does > not contain the desired character. > Third call (with fallback): > font_find_for_lface returns "Courier New", with registry "iso8859-1" > then nil > Forth call (with fallback): > font_find_for_lface returns nil > .... > eventually font_find_for_lface returns "MS Mincho" with registry > "jisx0208", which does contain the corresponding character (albiet > double width, looking suspiciously like katakana YO and not encodable by > jisx0208). There may be an incompatibility in the w32 font handling > here, because all truetype fonts are effectively unicode fonts, but we > return them when other registries that the font can manage are > requested. This is because Emacs requests iso8859-1 and other 8-bit > registries before requesting iso10646-1, and if we only return bitmap > fonts for those we will end up with an ugly display by default. ??? JISX0208 surely contains U+2203 (THERE EXISTS). By the way, in short, which part of the current code is wrong? Do you mean that there's a bug, or that the current strategy doesn't work for Windows? --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Mon, 22 Jun 2009 11:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124567155912827 (code B ref 3208); Mon, 22 Jun 2009 11:55:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 22 Jun 2009 11:52:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.216.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MBqYRd012805 for <3208@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 04:52:35 -0700 Received: by pxi2 with SMTP id 2so1377881pxi.19 for <3208@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 04:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ac1S8AqEsI7k2vAPyDsnaYQTEsXu6rDkhGVWnJd0mIw=; b=te1ubXIqvV1iL85afPicnyxFbZ8OhsquQVUCE76FN4M3ojkDFi83smGNYjSommiRrs 732Vwj2HAJQd43Z2QXbPWiS+an/5KMxwILk+u7RHkYLvKq+qstsCzSUTdKq2/u7lvAOz 8+RKsrdGn6a+T0Cr+pNgqiM3BYUN1GC3QcfwM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=ZBYYooYEQcsthyc6CwI435VMANfH2OMuRbpcwIXo+PD7uVZbF2ZLfxvD+0rjxIT8jx yGBi/dNZ8wlw5kXxyQYkrqpPYjpsbswZ3lkySNgwho4Ab2RO0K2VXVbszF+XtQ9jh34F uKKb1HOhX8u18RG07INTwBXZ3VdiHM5v/q3Hs= Received: by 10.142.234.16 with SMTP id g16mr2525329wfh.264.1245671548679; Mon, 22 Jun 2009 04:52:28 -0700 (PDT) Received: from ?192.168.249.26? ([124.13.3.16]) by mx.google.com with ESMTPS id 24sm517074wfc.17.2009.06.22.04.52.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Jun 2009 04:52:27 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A3F7058.902@gnu.org> Date: Mon, 22 Jun 2009 19:51:52 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: 3208@debbugs.gnu.org, schierlm@gmx.de References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > That will lead to slow display, but I don't understand why > that leads to memory full problem. How many fonts do people > have on Windows roughly? On GNU/Linux, I have about 700 > fontconfig fonts and 4500 X fonts. > I have 2092 fonts available in Emacs (1692 available through the gdi backend, 420 through the uniscribe backend - I'm not sure where the other 20 went). The problem occurs even without the gdi backend enabled - so with 420 fonts. > ??? JISX0208 surely contains U+2203 (THERE EXISTS). > My mistake, so that is no problem. > By the way, in short, which part of the current code is > wrong? Do you mean that there's a bug, or that the current > strategy doesn't work for Windows? > I haven't found what is actually going wrong here yet. But it looks like the problem is caused by has_char returning -1, then later encode_char returns FONT_INVALID_CODE. The latter does not happen with the gdi backend, because it just keeps the code as unicode, rejecting only characters that are beyond the first and last characters covered by the font. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Mon, 22 Jun 2009 13:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124567511723840 (code B ref 3208); Mon, 22 Jun 2009 13:00:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 22 Jun 2009 12:51:57 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MCpqiQ023830 for <3208@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 05:51:53 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5MCpoBV008669; Mon, 22 Jun 2009 21:51:50 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5MCpoZv015559; Mon, 22 Jun 2009 21:51:50 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n5MCpkeq027562; Mon, 22 Jun 2009 21:51:46 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MIizy-00049S-1j; Mon, 22 Jun 2009 21:51:46 +0900 From: Kenichi Handa To: Jason Rumney CC: 3208@debbugs.gnu.org, schierlm@gmx.de In-reply-to: <4A3F7058.902@gnu.org> (message from Jason Rumney on Mon, 22 Jun 2009 19:51:52 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> Message-Id: Date: Mon, 22 Jun 2009 21:51:46 +0900 In article <4A3F7058.902@gnu.org>, Jason Rumney writes: > > By the way, in short, which part of the current code is > > wrong? Do you mean that there's a bug, or that the current > > strategy doesn't work for Windows? > I haven't found what is actually going wrong here yet. But it looks like > the problem is caused by has_char returning -1, then later encode_char > returns FONT_INVALID_CODE. The latter does not happen with the gdi > backend, because it just keeps the code as unicode, rejecting only > characters that are beyond the first and last characters covered by the > font. I think the same thing happens with x font-backend when iso10646-1 font is requested. But, it doesn't cause a problem on GNU/Linux. I managed to install mingw and msys, and built Emacs with them. Then, I started Emacs, set the defualt font to "Arial Unicode MS", and insert many #x2203 characters. But, I can't reproduce the problem. By the way, I also installed gdb-6.8-mingw-3.tar.bz2. But, with "M-x gdb", pp and pr commands doesn't work. They print nothing. They do work when gdb is invoked from command line. Do you know what is wrong? --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Mon, 22 Jun 2009 13:10:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124567599327316 (code B ref 3208); Mon, 22 Jun 2009 13:10:10 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 22 Jun 2009 13:06:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.216.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MD6S7O027305 for <3208@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 06:06:29 -0700 Received: by pxi2 with SMTP id 2so1402693pxi.19 for <3208@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 06:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=3DYsBrFO9Hm9pPyucI4oW5A/tvrja8Wc3mKCtTAhUvU=; b=bZy1xn5vS9ziRvicvz552UGgVCiOum/lgKhk/pDwhDE3VO/OVXiJx+5rps32wox4X5 d44E75A+jtm1f7RL6TdQF2iEoRMZNRorOBIbXpvm2wc5Ri5/8wey0MgEjGsJtIb9qZwc LtqFXCwkq7VvKtN69BhGnsqGsE8MK0sOOaTUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=klQDcHCoac466Z4Lask+puSkwx0mdbaYe6w0lOYs5hq4Qz+iqaDy/s72Qd920eyIi0 JzEQCkpRrB/V9SqDcRobYbMrVv1EUDXymms/GOJCo44CeOIFfsCsX3ufbTSC/TITviYt VaTNcoa1WqS5qFKdzta5wMaNhcH8cLGL69O6w= Received: by 10.142.171.3 with SMTP id t3mr2564281wfe.74.1245675983410; Mon, 22 Jun 2009 06:06:23 -0700 (PDT) Received: from ?192.168.249.26? ([124.13.3.16]) by mx.google.com with ESMTPS id 28sm692489wfg.5.2009.06.22.06.06.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Jun 2009 06:06:22 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A3F81AC.1070404@gnu.org> Date: Mon, 22 Jun 2009 21:05:48 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: 3208@debbugs.gnu.org, schierlm@gmx.de References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > I managed to install mingw and msys, and built Emacs with > them. Then, I started Emacs, set the defualt font to "Arial > Unicode MS", and insert many #x2203 characters. But, I > can't reproduce the problem. > Part of the recipe is that you don't set Arial Unicode MS as the default font, you let the font fallback find it (in the case of the original report, or MS Mincho in my case). > By the way, I also installed gdb-6.8-mingw-3.tar.bz2. But, > with "M-x gdb", pp and pr commands doesn't work. They print > nothing. They do work when gdb is invoked from command > line. Do you know what is wrong? > I've often had problems in the past using debuggers under Emacs on Windows (under Emacs 21 and early 22 development versions though, so I haven't tried the new gdb-ui extensively), so I always use the command line. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Wed, 24 Jun 2009 04:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.12458175851173 (code B ref 3208); Wed, 24 Jun 2009 04:35:05 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 24 Jun 2009 04:26:25 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5O4QJ06001163 for <3208@emacsbugs.donarmstrong.com>; Tue, 23 Jun 2009 21:26:21 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5O4QIZE006127; Wed, 24 Jun 2009 13:26:18 +0900 (JST) env-from (handa@m17n.org) Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5O4QInE015028; Wed, 24 Jun 2009 13:26:18 +0900 (JST) env-from (handa@m17n.org) Received: by smtp3.aist.go.jp with ESMTP id n5O4QIvK012802; Wed, 24 Jun 2009 13:26:18 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MJK3t-0001H8-W8; Wed, 24 Jun 2009 13:26:17 +0900 From: Kenichi Handa To: Jason Rumney CC: 3208@debbugs.gnu.org, schierlm@gmx.de In-reply-to: <4A3F81AC.1070404@gnu.org> (message from Jason Rumney on Mon, 22 Jun 2009 21:05:48 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> Message-Id: Date: Wed, 24 Jun 2009 13:26:17 +0900 In article <4A3F81AC.1070404@gnu.org>, Jason Rumney writes: > Part of the recipe is that you don't set Arial Unicode MS as the default > font, you let the font fallback find it (in the case of the original > report, or MS Mincho in my case). Although I still can't reproduce the problem (except for the very slowness redisplay), I noticed some inefficiency in fontset_font. So, I've installed an improvement in the TRUNK. As a result, in the case of inserting many #x2203, the redisplay got faster. Could you please test it? --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Wed, 24 Jun 2009 10:45:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124583989531507 (code B ref 3208); Wed, 24 Jun 2009 10:45:11 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 24 Jun 2009 10:38:15 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5OAcBVx031502 for <3208@emacsbugs.donarmstrong.com>; Wed, 24 Jun 2009 03:38:12 -0700 Received: by wf-out-1314.google.com with SMTP id 28so230394wfa.13 for <3208@emacsbugs.donarmstrong.com>; Wed, 24 Jun 2009 03:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=VoCtEgB+QlPdqG3RSoq4yCNtT7vUY0L3vekZj+F3Q5A=; b=mBEkgxJ7xabWeG44MXTiIiRwhm4ZY/t8NKgPGilJiFtsG5EmIBBmTXwowTJS57TVkZ dt2+2Ccx4SEIJRxY+kBMsy8PfoRZJCPdCxfqN7Lw6CD3Ww/8GRMc4TqM73cdDa0ptY4m jc4hkvX/ski9eLwDWGCObysXhbKErSKL4ftD4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=YtsTObVTQz7jRYzD2ibmtN3qxGE8bHEZwCcDlyU6vCWVPTKQkD61H+KbMZYfhvuoYp 4wa+cS5YliVaIPhsewXlNzQifr3jtyXTJ07Bn6ePWXsuHboB55Uh0vbqw1aTsRlAs4Hn HGOZ8u9lNGuCBXjxWyRlHTo36sdAEIbwg1kR4= Received: by 10.142.88.3 with SMTP id l3mr316193wfb.339.1245839890829; Wed, 24 Jun 2009 03:38:10 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.236.135]) by mx.google.com with ESMTPS id 30sm2751644wff.9.2009.06.24.03.38.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Jun 2009 03:38:09 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A4201EF.7000901@gnu.org> Date: Wed, 24 Jun 2009 18:37:35 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: 3208@debbugs.gnu.org, schierlm@gmx.de References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > Although I still can't reproduce the problem (except for the > very slowness redisplay), I noticed some inefficiency in > fontset_font. So, I've installed an improvement in the > TRUNK. As a result, in the case of inserting many #x2203, > the redisplay got faster. > The memory full problem is still there. I am surprised you don't see it if you are seeing the slowness, since if things were working correctly, only the first character displayed should be slow while the fonts are searched, subsequent insertion of the same character should reuse the cached font. Your change seems to have reduced the first time display of etc/HELLO from 12 seconds for the uniscribe backend to 10 seconds, vs 2 seconds for the gdi backend and Emacs 22 (though only uniscribe can display the complex scripts correctly). Subsequent redisplays are near instantaneous, so it still seems to be searching for fonts rather than displaying them that takes the time. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Wed, 24 Jun 2009 10:50:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124584025532209 (code B ref 3208); Wed, 24 Jun 2009 10:50:05 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 24 Jun 2009 10:44:15 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5OAi9rP032203 for <3208@emacsbugs.donarmstrong.com>; Wed, 24 Jun 2009 03:44:10 -0700 Received: by wf-out-1314.google.com with SMTP id 28so231267wfa.13 for <3208@emacsbugs.donarmstrong.com>; Wed, 24 Jun 2009 03:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=5roIZ1u2oYb6EhgwrCCxUnG/coKZc3yRIleoowm1KUs=; b=g/KdrWrJCp2wW6DvJg0EkohKz0eGMRFNOBozmUD5Lq5CnAa8w6nSKau5qYCWKe5aJZ ESC5NcwV6yQfdCl8M9XtgwUCygIrdV6GcxXT9f8fYelCgvh/m0UOsxMDaiKctUfyjyKu 8o9TKjU0NAPG9FCT7FN3Wgu9GjxFqk451CXdc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=le0CoEVNhk1HAl/A/1tsSLF1ye9Fj9JXtwBIjonl2am5y+y+tVC5BGK+BXJBMVxar5 0HTsqMR5b1+c2idnwYiy+9dCz00/njz8NIfR5yd3V6E2wWGFk8SdKCSVQpIshNH69sXL fMygwI+YAOAYigUZ6v7VsBajUWEwhWkg8gbR4= Received: by 10.143.43.7 with SMTP id v7mr340770wfj.3.1245840248832; Wed, 24 Jun 2009 03:44:08 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.236.135]) by mx.google.com with ESMTPS id 30sm3210165wfa.35.2009.06.24.03.44.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Jun 2009 03:44:08 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A420357.8050706@gnu.org> Date: Wed, 24 Jun 2009 18:43:35 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: 3208@debbugs.gnu.org, schierlm@gmx.de References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > In article <4A3F81AC.1070404@gnu.org>, Jason Rumney writes: > > >> Part of the recipe is that you don't set Arial Unicode MS as the default >> font, you let the font fallback find it (in the case of the original >> report, or MS Mincho in my case). >> > > Although I still can't reproduce the problem I wonder if the default font contains the character U+2203 in your case, since you are using a Japanese locale. Can you try reproducing it using the other characters suggested in the original message: U+2202 and U+FFFD? In my case I only see the problem with U+2203 with emacs -Q, but I did originally reproduce the problem with one of those other characters after changing the default font to something else. (let ((str (char-to-string (decode-char 'ucs #xFFFD)))) (dotimes (i 16) (setq str (concat str str))) (insert str) (goto-char (point-min)) (goto-char (point-max)) (goto-char (point-min)) (goto-char (point-max)) (goto-char (point-min)) (goto-char (point-max))) From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Wed, 24 Jun 2009 11:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124584394310116 (code B ref 3208); Wed, 24 Jun 2009 11:50:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 24 Jun 2009 11:45:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5OBjbgG009951 for <3208@emacsbugs.donarmstrong.com>; Wed, 24 Jun 2009 04:45:39 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5OBjZoB005806; Wed, 24 Jun 2009 20:45:36 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5OBjZgh005883; Wed, 24 Jun 2009 20:45:35 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n5OBjZDd002423; Wed, 24 Jun 2009 20:45:35 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MJQv1-0005pp-2K; Wed, 24 Jun 2009 20:45:35 +0900 From: Kenichi Handa To: Jason Rumney CC: 3208@debbugs.gnu.org, schierlm@gmx.de In-reply-to: <4A4201EF.7000901@gnu.org> (message from Jason Rumney on Wed, 24 Jun 2009 18:37:35 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A4201EF.7000901@gnu.org> Message-Id: Date: Wed, 24 Jun 2009 20:45:35 +0900 In article <4A4201EF.7000901@gnu.org>, Jason Rumney writes: > Kenichi Handa wrote: > > Although I still can't reproduce the problem (except for the > > very slowness redisplay), I noticed some inefficiency in > > fontset_font. So, I've installed an improvement in the > > TRUNK. As a result, in the case of inserting many #x2203, > > the redisplay got faster. > The memory full problem is still there. I am surprised you don't see it > if you are seeing the slowness, since if things were working correctly, > only the first character displayed should be slow while the fonts are > searched, subsequent insertion of the same character should reuse the > cached font. Even if Emacs once finds a font for a specific character C, it doesn't directly cache the font for C. Instead, the font is recorded in a font-group that is shared with the other characters (in a fontset). So, each time we display C, we must find a font that can display C within the cached fonts. Of course, this process is, I think, far faster than font-listing and opening, it is not instant especially when the target font is at the end of the font-group. The recipe of the original report inserts a very long line. In that case, when Emacs displays a character at the end of line, Emacs tries to check fonts of all characters in the line. This takes considerable amount of time (in my case 4 seconds before my patch and 2.5 seconds after the patch) even if the font is cached. > Your change seems to have reduced the first time display of etc/HELLO Actually it should reduce the second time display of a specific group of characters. But, as HELLO file contains many different characters belonging to the same group, display of some characters gets faster if a character of the same group is already shown. > from 12 seconds for the uniscribe backend to 10 seconds, vs 2 seconds > for the gdi backend and Emacs 22 (though only uniscribe can display the > complex scripts correctly). Subsequent redisplays are near > instantaneous, so it still seems to be searching for fonts rather than > displaying them that takes the time. Anyway, it is not good to use HELLO file for comparing because Emacs 23 knows more kinds of fonts can display a specific character and thus tries more fonts. So, it takes more time to conclude that you system doesn't have a font for that specific character. --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Wed, 24 Jun 2009 12:00:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124584455011779 (code B ref 3208); Wed, 24 Jun 2009 12:00:06 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 24 Jun 2009 11:55:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.4 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5OBthPV011658 for <3208@emacsbugs.donarmstrong.com>; Wed, 24 Jun 2009 04:55:45 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5OBtgla011506; Wed, 24 Jun 2009 20:55:42 +0900 (JST) env-from (handa@m17n.org) Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5OBtgPJ007179; Wed, 24 Jun 2009 20:55:42 +0900 (JST) env-from (handa@m17n.org) Received: by smtp3.aist.go.jp with ESMTP id n5OBtfGA010189; Wed, 24 Jun 2009 20:55:41 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MJR4n-0005qZ-JD; Wed, 24 Jun 2009 20:55:41 +0900 From: Kenichi Handa To: Jason Rumney CC: 3208@debbugs.gnu.org, schierlm@gmx.de In-reply-to: <4A420357.8050706@gnu.org> (message from Jason Rumney on Wed, 24 Jun 2009 18:43:35 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: Date: Wed, 24 Jun 2009 20:55:41 +0900 In article <4A420357.8050706@gnu.org>, Jason Rumney writes: >>> Part of the recipe is that you don't set Arial Unicode MS as the default >>> font, you let the font fallback find it (in the case of the original >>> report, or MS Mincho in my case). > > > > Although I still can't reproduce the problem > I wonder if the default font contains the character U+2203 in your case, > since you are using a Japanese locale. No. My default font is: uniscribe:-outline-Courier new-normal-normal-normal-mono-13-*-*-*-c-*-iso88591 and #x2203 is displayed by: uniscribe:-outline-MS ゴシック-normal-normal-normal-mono-13-*-*-*-c-*-jisx0208*-* This font is found in the fallback group of the default fontset (not in the frame's fontset). By font-show-log, I confirmed that fontset_font() checked these to find that font: (1) the frame's fontset (2) the default fontset (3) the fallbacks of the frame's fontset (4) the fallbacks of the default fontset. So, isn't the situation the same as yours? > Can you try reproducing it using > the other characters suggested in the original message: U+2202 and U+FFFD? A font for U+2202 is found at (2) above, and a font for U+FFFD is not found. In both case, Emacs didn't cause memory full. By the way, my Emacs on Windows is as this: GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-06-24 on IBM-FSF27A21743 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)'. --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Thu, 25 Jun 2009 08:15:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.1245917429642 (code B ref 3208); Thu, 25 Jun 2009 08:15:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 25 Jun 2009 08:10:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5P8ANhd000631 for <3208@emacsbugs.donarmstrong.com>; Thu, 25 Jun 2009 01:10:24 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5P8AMrb024976; Thu, 25 Jun 2009 17:10:22 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5P8AL8M005497; Thu, 25 Jun 2009 17:10:22 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n5P8ALas028054; Thu, 25 Jun 2009 17:10:21 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MJk2H-0003vr-O9; Thu, 25 Jun 2009 17:10:21 +0900 From: Kenichi Handa To: Jason Rumney CC: schierlm@gmx.de, 3208@debbugs.gnu.org In-reply-to: <4A422909.9060800@gnu.org> (message from Jason Rumney on Wed, 24 Jun 2009 21:24:25 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> Message-Id: Date: Thu, 25 Jun 2009 17:10:21 +0900 I've just installed another patch for fontset.c in trunk. With that, even in English language environment, (insert-char #x2203 10000) is not that slow. But, it may just hide the original problem of memory full. I'll keep on finding why that happens. --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Thu, 25 Jun 2009 13:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124593616524398 (code B ref 3208); Thu, 25 Jun 2009 13:30:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 25 Jun 2009 13:22:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.216.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5PDMfoP024392 for <3208@emacsbugs.donarmstrong.com>; Thu, 25 Jun 2009 06:22:43 -0700 Received: by pxi2 with SMTP id 2so1101708pxi.19 for <3208@emacsbugs.donarmstrong.com>; Thu, 25 Jun 2009 06:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=6AK2TprlRjWZPVwsLRVaauLsxLsTvIec8QOiSQG9ofg=; b=D2LqyOp9AUoQI8FMMLYszYT1TvED4XIUnowA5KimSOipPh6yTIKYMbriivfMLomvA1 K8V2P087mYCyBqM77GCFJzl/q6nvyFvCvhWiKfGcr+Z13OzT/4+6pwR3o3ugK/zkqjUy HnPWBJANJ9zHVNwZvTsftWbnFrTfBXV2qEQ5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=gwxkAIuKBOOaHWBw4kkL/wJRf44acilhPDa2wzThwHbqBxOAicjdMevKAH7jH7EJN2 f0P5m30f3o0ex0FFbcKxKm8W/ot30vg5EQbbrS7Ll8rkDIME0gOP5g3jCVZ20gYNcbw7 NES50VeGrMtuw24G4U7yjvh+DW1N83/E+j7hg= Received: by 10.142.108.3 with SMTP id g3mr822256wfc.77.1245936156423; Thu, 25 Jun 2009 06:22:36 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.236.135]) by mx.google.com with ESMTPS id 22sm1503482wfg.27.2009.06.25.06.22.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Jun 2009 06:22:34 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A4379F7.4000100@gnu.org> Date: Thu, 25 Jun 2009 21:21:59 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: schierlm@gmx.de, 3208@debbugs.gnu.org References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > I've just installed another patch for fontset.c in trunk. > With that, even in English language environment, > (insert-char #x2203 10000) is not that slow. > > But, it may just hide the original problem of memory full. > I'll keep on finding why that happens. > It seems to avoid the problem in this case at least. I can now insert over a million of the characters from the original recipe without a problem (and within 5 seconds) by changing the 16 in the original recipe to 20. I think this change should go in the release branch, then we can close the bug (or lower its priority if you would rather continue to investigate). From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Fri, 26 Jun 2009 01:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124597959321732 (code B ref 3208); Fri, 26 Jun 2009 01:30:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 26 Jun 2009 01:26:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.4 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5Q1QQJK021712 for <3208@emacsbugs.donarmstrong.com>; Thu, 25 Jun 2009 18:26:27 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5Q1QMQs005309; Fri, 26 Jun 2009 10:26:23 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5Q1QMC6026633; Fri, 26 Jun 2009 10:26:22 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n5Q1QMsT014218; Fri, 26 Jun 2009 10:26:22 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MK0Cs-0006cp-AB; Fri, 26 Jun 2009 10:26:22 +0900 From: Kenichi Handa To: Jason Rumney CC: schierlm@gmx.de, 3208@debbugs.gnu.org In-reply-to: <4A4379F7.4000100@gnu.org> (message from Jason Rumney on Thu, 25 Jun 2009 21:21:59 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> <4A4379F7.4000100@gnu.org> Message-Id: Date: Fri, 26 Jun 2009 10:26:22 +0900 In article <4A4379F7.4000100@gnu.org>, Jason Rumney writes: > It seems to avoid the problem in this case at least. I can now insert > over a million of the characters from the original recipe without a > problem (and within 5 seconds) by changing the 16 in the original recipe > to 20. > I think this change should go in the release branch, I think we need the previous change too for 23.1. Yidon and Stefan, may I install the attached change in EMACS_23_1_RC? It seems that this is an effective workaround of the serious problem on Windows. Theoretically, the same problem happens on GNU/Linux too. > then we can close the bug (or lower its priority if you > would rather continue to investigate). Please just lower the priority. I'll continue to investigate. I now have one hypothesis. On Windows, both uniscribe and gdi font backends returns many fonts. When Emacs try to find a suitable font from them, they are concatinated to a single vector and sorted. This vector is created and abondoned many times. If no GC happens while displaying all characters of that long line, those temporarily created Lisp vectors accumulate in memory without reused, which may lead to memory full. What do you think? --- Kenichi Handa handa@m17n.org 2009-06-25 Kenichi Handa * fontset.c (fontset_find_font): When a usable rfont_def is found in a fallback font-group, make it the first element of the group. (fontset_get_font_group): Return 0 if no font-group is set for C. (fontset_font): Record the availability of a font for C both in the realized fontsets of the current one and the default one. Index: fontset.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/fontset.c,v retrieving revision 1.173 diff -u -r1.173 fontset.c --- fontset.c 8 Jun 2009 04:33:40 -0000 1.173 +++ fontset.c 26 Jun 2009 01:00:46 -0000 @@ -459,6 +459,12 @@ XSETCAR (font_group, make_number (charset_ordered_list_tick)); } +/* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for + character C in FONTSET. If C is -1, return a fallback font-group. + If C is not -1, the value may be Qt (FONTSET doesn't have a font + for C even in the fallback group, or 0 (a font for C may be found + only in the fallback group). */ + static Lisp_Object fontset_get_font_group (Lisp_Object fontset, int c) { @@ -480,9 +486,10 @@ font_group = FONTSET_FALLBACK (base_fontset); if (NILP (font_group)) { + font_group = make_number (0); if (c >= 0) - char_table_set_range (fontset, from, to, make_number (0)); - return Qnil; + char_table_set_range (fontset, from, to, font_group); + return font_group; } font_group = Fcopy_sequence (font_group); for (i = 0; i < ASIZE (font_group); i++) @@ -524,9 +531,10 @@ int id, fallback; { Lisp_Object vec, font_group; - int i, charset_matched = -1; + int i, charset_matched = -1, found_index; FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))) ? XFRAME (selected_frame) : XFRAME (FONTSET_FRAME (fontset)); + Lisp_Object rfont_def; font_group = fontset_get_font_group (fontset, fallback ? -1 : c); if (! CONSP (font_group)) @@ -546,9 +554,9 @@ first. */ for (i = 0; i < ASIZE (vec); i++) { - Lisp_Object rfont_def = AREF (vec, i); Lisp_Object repertory; + rfont_def = AREF (vec, i); if (NILP (rfont_def)) break; repertory = FONT_DEF_REPERTORY (RFONT_DEF_FONT_DEF (rfont_def)); @@ -564,18 +572,22 @@ /* Find the first available font in the vector of RFONT-DEF. */ for (i = 0; i < ASIZE (vec); i++) { - Lisp_Object rfont_def, font_def; + Lisp_Object font_def; Lisp_Object font_entity, font_object; if (i == 0 && charset_matched >= 0) { /* Try the element matching with the charset ID at first. */ rfont_def = AREF (vec, charset_matched); + found_index = charset_matched; charset_matched = -1; i--; } else if (i != charset_matched) - rfont_def = AREF (vec, i); + { + rfont_def = AREF (vec, i); + found_index = i; + } else continue; @@ -623,7 +635,7 @@ } if (font_has_char (f, font_object, c)) - return rfont_def; + goto found; /* Find a font already opened, maching with the current spec, and supporting C. */ @@ -637,7 +649,7 @@ break; font_object = RFONT_DEF_OBJECT (AREF (vec, i)); if (! NILP (font_object) && font_has_char (f, font_object, c)) - return rfont_def; + goto found; } /* Find a font-entity with the current spec and supporting C. */ @@ -654,6 +666,7 @@ Qnil); if (NILP (font_object)) continue; + found_index = i; RFONT_DEF_NEW (rfont_def, font_def); RFONT_DEF_SET_OBJECT (rfont_def, font_object); RFONT_DEF_SET_SCORE (rfont_def, RFONT_DEF_SCORE (rfont_def)); @@ -661,10 +674,12 @@ for (j = 0; j < i; j++) ASET (new_vec, j, AREF (vec, j)); ASET (new_vec, j, rfont_def); + found_index = j; for (j++; j < ASIZE (new_vec); j++) ASET (new_vec, j, AREF (vec, j - 1)); XSETCDR (font_group, new_vec); - return rfont_def; + vec = new_vec; + goto found; } /* No font of the current spec for C. Try the next spec. */ @@ -673,6 +688,19 @@ FONTSET_SET (fontset, make_number (c), make_number (0)); return Qnil; + + found: + if (fallback && found_index > 0) + { + /* The order of fonts in the fallback font-group is not that + important, and it is better to move the found font to the + first of the group so that the next try will find it + quickly. */ + for (i = found_index; i > 0; i--) + ASET (vec, i, AREF (vec, i - 1)); + ASET (vec, 0, rfont_def); + } + return rfont_def; } @@ -683,15 +711,15 @@ struct face *face; int id; { - Lisp_Object rfont_def; + Lisp_Object rfont_def, default_rfont_def; Lisp_Object base_fontset; /* Try a font-group of FONTSET. */ rfont_def = fontset_find_font (fontset, c, face, id, 0); if (VECTORP (rfont_def)) return rfont_def; - if (EQ (rfont_def, Qt)) - goto no_font; + if (NILP (rfont_def)) + FONTSET_SET (fontset, make_number (c), make_number (0)); /* Try a font-group of the default fontset. */ base_fontset = FONTSET_BASE (fontset); @@ -700,32 +728,36 @@ if (NILP (FONTSET_DEFAULT (fontset))) FONTSET_DEFAULT (fontset) = make_fontset (FONTSET_FRAME (fontset), Qnil, Vdefault_fontset); - rfont_def = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 0); - if (VECTORP (rfont_def)) - return rfont_def; - if (EQ (rfont_def, Qt)) - goto no_font; + default_rfont_def + = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 0); + if (VECTORP (default_rfont_def)) + return default_rfont_def; + if (NILP (default_rfont_def)) + FONTSET_SET (FONTSET_DEFAULT (fontset), make_number (c), + make_number (0)); } /* Try a fallback font-group of FONTSET. */ - rfont_def = fontset_find_font (fontset, c, face, id, 1); - if (VECTORP (rfont_def)) - return rfont_def; - if (EQ (rfont_def, Qt)) - goto no_font; + if (! EQ (rfont_def, Qt)) + { + rfont_def = fontset_find_font (fontset, c, face, id, 1); + if (VECTORP (rfont_def)) + return rfont_def; + /* Remember that FONTSET has no font for C. */ + FONTSET_SET (fontset, make_number (c), Qt); + } - /* Try a fallback font-group of the default fontset . */ - if (! EQ (base_fontset, Vdefault_fontset)) + /* Try a fallback font-group of the default fontset. */ + if (! EQ (base_fontset, Vdefault_fontset) + && ! EQ (default_rfont_def, Qt)) { rfont_def = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 1); if (VECTORP (rfont_def)) return rfont_def; + /* Remember that the default fontset has no font for C. */ + FONTSET_SET (FONTSET_DEFAULT (fontset), make_number (c), Qt); } - no_font: - /* Remember that we have no font for C. */ - FONTSET_SET (fontset, make_number (c), Qt); - return Qnil; } From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Jason Rumney , 3208@debbugs.gnu.org Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Fri, 26 Jun 2009 06:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.12459957181742 (code B ref 3208); Fri, 26 Jun 2009 06:00:05 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 26 Jun 2009 05:55:18 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, RCVD_IN_NIX1,RCVD_IN_SBLXBL,RCVD_IN_SBLXBL_CBL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.236]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5Q5tDIo001679 for <3208@emacsbugs.donarmstrong.com>; Thu, 25 Jun 2009 22:55:14 -0700 Received: by rv-out-0506.google.com with SMTP id f6so563121rvb.1 for <3208@emacsbugs.donarmstrong.com>; Thu, 25 Jun 2009 22:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=I5cyfvbGBa1TWDXCSxBFkFz/fA/7uuLJIIVUygfO4JM=; b=N2gNoYWU94ArdTL2qnvoIckdyGDsJEdPfiZm/bQhiKqcMJQzYuK7gDYVPSnCjc1x87 xnjarB+x+LTzkqGSo3FtsumnVpuaitLiAN2GHSnvyNSY3LYAhaoS+IU1TnTimm+hg8DG humOcwC3Mt6AsFOeBQb9UtGDopIouoOFIYxIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Yenzb5GGTfZjJynlL7Zo+9l4CcVuxJ/156SYmR18YHevCbPTKBPF9opA+qxVGgzXx2 Q0f1d20jGL1i+CXTFBWxbhCBKoGApNUrCR0TBZok2Mc8H0EglH1VXq+yKKR9l/Og1Pka oelFottYmBkdb5vBXqwtzPrtFNZ69A3835NZ4= Received: by 10.140.247.13 with SMTP id u13mr524553rvh.248.1245995712840; Thu, 25 Jun 2009 22:55:12 -0700 (PDT) Received: from ?10.1.1.112? ([61.4.103.130]) by mx.google.com with ESMTPS id k2sm5102724rvb.42.2009.06.25.22.55.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Jun 2009 22:55:12 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A44629C.9040209@gnu.org> Date: Fri, 26 Jun 2009 13:54:36 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Kenichi Handa CC: schierlm@gmx.de, 3208@debbugs.gnu.org References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> <4A4379F7.4000100@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kenichi Handa wrote: > If no GC happens while displaying all characters of that > long line, those temporarily created Lisp vectors accumulate > in memory without reused, which may lead to memory full. > While I was profiling to try to identify a possible cause, there were 6 GCs in the 25 seconds that Emacs was running (taking up 22% of the time). So GC does seem to happen, though maybe it was after the first warning was thrown. From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Fri, 26 Jun 2009 13:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124602196513845 (code B ref 3208); Fri, 26 Jun 2009 13:20:03 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 26 Jun 2009 13:12:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5QDCe1t013833 for <3208@emacsbugs.donarmstrong.com>; Fri, 26 Jun 2009 06:12:41 -0700 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n5QDCdi1017871; Fri, 26 Jun 2009 22:12:39 +0900 (JST) env-from (handa@m17n.org) Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n5QDCcQd005540; Fri, 26 Jun 2009 22:12:38 +0900 (JST) env-from (handa@m17n.org) Received: by smtp4.aist.go.jp with ESMTP id n5QDCcxb008365; Fri, 26 Jun 2009 22:12:38 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MKBEM-0007zh-6z; Fri, 26 Jun 2009 22:12:38 +0900 From: Kenichi Handa To: Jason Rumney CC: schierlm@gmx.de, 3208@debbugs.gnu.org In-reply-to: <4A44629C.9040209@gnu.org> (message from Jason Rumney on Fri, 26 Jun 2009 13:54:36 +0800) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> <4A4379F7.4000100@gnu.org> <4A44629C.9040209@gnu.org> Message-Id: Date: Fri, 26 Jun 2009 22:12:38 +0900 In article <4A44629C.9040209@gnu.org>, Jason Rumney writes: > Kenichi Handa wrote: > > If no GC happens while displaying all characters of that > > long line, those temporarily created Lisp vectors accumulate > > in memory without reused, which may lead to memory full. > > > While I was profiling to try to identify a possible cause, there were 6 > GCs in the 25 seconds that Emacs was running (taking up 22% of the > time). So GC does seem to happen, though maybe it was after the first > warning was thrown. I added a static variable `vconcat_size' that accumulates the size of vectors created by Fvconcat at the end of font_list_entities. After (insert-char #x2203 10000), GC is called once while update_menu_bar is called. After that, until memory_full is called (in the Fvconcat above), no GC is called, and vconcat_size increases by about 100M which means at least 400M bytes is consumued by dead vectors. So, I think the above hypothesis is correct. --- Kenichi Handa handa@m17n.org From jasonrumney@gmail.com Fri Jun 26 07:15:10 2009 Received: (at control) by emacsbugs.donarmstrong.com; 26 Jun 2009 14:15:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=AWL,VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.216.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5QEF6TG024828 for ; Fri, 26 Jun 2009 07:15:07 -0700 Received: by pxi2 with SMTP id 2so1673178pxi.19 for ; Fri, 26 Jun 2009 07:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=3449JTnc+KZhoBURVZeQ1BbwGrZCnhoJa0R9ox9pq3c=; b=RDB6QhU6wQXKGOhn4flcNvKbppcQJb1B5QV6fwQROWsyAIhd7Y9EK74FQgiERgcfzh kMIRmFkUcYdZVfXKwfImwtD6PMC4LloD4eVLPxI1RNzWqtm6zEANJmpiy39B1dsnLApQ zmUPaUW+jcFKVjj3d4QPvWsJsch8+D04JlxBc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=U4+nfwkNGWTRJS0vRTSed4peBQG+80bvAu3ztBSxefjVwu7bOOpQ8FbkCyn3Kn6Qbk U5TwR1qpspkTMCH+Rum0UBnpgbaHiIRKtwRy0qoMFjMp35mj4zQ6UX38BGYAMzjKEUia FOBb+S8QtfoAEG1E7pUn3gh9y8B9T4zRnTzkY= Received: by 10.114.169.20 with SMTP id r20mr5949054wae.134.1246025698428; Fri, 26 Jun 2009 07:14:58 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.236.135]) by mx.google.com with ESMTPS id f20sm5331508waf.17.2009.06.26.07.14.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Jun 2009 07:14:58 -0700 (PDT) Sender: Jason Rumney Message-ID: <4A44D7C1.6050701@gnu.org> Date: Fri, 26 Jun 2009 22:14:25 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Emacs bug Tracking System Subject: Lower priority of bug that has been mitigated Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit severity 3208 normal From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Thu, 02 Jul 2009 12:15:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.12465368104225 (code B ref 3208); Thu, 02 Jul 2009 12:15:04 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 2 Jul 2009 12:13:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,FOURLA,FVGT_m_MULTI_ODD, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n62CDMZC004211 for <3208@emacsbugs.donarmstrong.com>; Thu, 2 Jul 2009 05:13:24 -0700 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n62CDFwD028359; Thu, 2 Jul 2009 21:13:15 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n62CDFe5011051; Thu, 2 Jul 2009 21:13:15 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n62CDCE1008507; Thu, 2 Jul 2009 21:13:12 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MMLA8-0007F3-D6; Thu, 02 Jul 2009 21:13:12 +0900 From: Kenichi Handa To: 3208@debbugs.gnu.org CC: cyd@stupidchicken.com, monnier@iro.umontreal.ca, jasonr@gnu.org, schierlm@gmx.de In-reply-to: (message from Kenichi Handa on Fri, 26 Jun 2009 10:26:22 +0900) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> <4A4379F7.4000100@gnu.org> Message-Id: Date: Thu, 02 Jul 2009 21:13:12 +0900 Attached is a new patch I propose for 23.1 to solve the bug. It is not the best one, but is simpler and safer. I'll summarize the problem here. Yidong and Stefan, please consider installing it. Emacs searches for a font for C in this order: (1) search a font-group for C in the current fontset. (2) search a font-group for C in the default fontset. (3) search a fallback font-group of the current fontset. (4) search a fallback font-group of the default fontset. The problem occurs when there's a very long line that contains characters whose fonts are found only in the second or later font in the group at step (4). Actually there are two problems; memory full and extreme slowness. They happen typically on Windows because both uniscribe and gdi font-backends returns many fonts, but theoretically it happens also on GNU/Linux. First, the reason of memory full is this. When a set of fonts are found in multiple font-backends, Emacs concatenates them into a single vector, sort elements of the vector, then return the best matching font. This is done for each character in a line. But, as Emacs doesn't perform GC while displaying that long line, the created (and then abandoned) vectors consume memory without being re-used. This results in memory full error. The changes for font.c in the patch is to solve it. The strategy is to cache vectors of specific sizes in a weak hash table for reuse until the next GC time. Next, the reason of slowness is this. When a font is found in the second or the following spec in the fallback font-group, Emacs sorts fonts matching with the first spec in the font-group, then check if fonts support C one by one, even if it results in no-font-for-C. This is because Emacs doesn't remember which font-spec in the font-group can return a suitable font for C. We can't remember such info for each character because it requires lots of memory. So, anyway this sorting and checking is done for each character in that long line, and it's very slow. The changes for fontset.c in the patch is to solve it by re-ordering the entries in the font-group so that the lastly used entry comes first. We do this re-ordering only for fallback font-group assuming that the order is not that important in a fallback font-group. And, for a font-group corresponding to a character, usually the font-specs are more specific and the number of matching fonts is small, and thus the above soring and checking is not that heavy. By the way, I'm going to install a different change (bigger but better) for 23.2. --- Kenichi Handa handa@m17n.org 2009-07-02 Kenichi Handa * font.c (font_entity_vector_cache): New variable. (syms_of_font): Initialize it. (font_concat_entities): New function. (font_list_entities): Use font_concat_entities instead of Fvconcat. * fontset.c (fontset_find_font): Re-order a fallback font-group. (fontset_font): Treat return value t of fontset_find_font as a sign of no-font in that fontset, not as a sign of no-font anywhere. Index: font.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/font.c,v retrieving revision 1.133 diff -u -r1.133 font.c --- font.c 10 Jun 2009 01:26:15 -0000 1.133 +++ font.c 2 Jul 2009 11:13:16 -0000 @@ -2763,6 +2763,33 @@ return Fnreverse (val); } +static Lisp_Object font_entity_vector_cache; + +/* Concatenate lists of font-entities in VEC_ENTITY_LIST or length LEN. */ + +static Lisp_Object +font_concat_entities (Lisp_Object *vec_entity_list, int len) +{ + int i, j, num; + Lisp_Object vec, tail; + + for (i = 0, num = 0; i < len; i++) + num += XINT (Flength (vec_entity_list[i])); + vec = Fgethash (make_number (num), font_entity_vector_cache, Qnil); + if (NILP (vec)) + { + vec = Fvconcat (len, vec_entity_list); + Fputhash (make_number (num), vec, font_entity_vector_cache); + } + else + { + for (i = 0, j = 0; i < len; i++) + for (tail = vec_entity_list[i]; CONSP (tail); tail = XCDR (tail), j++) + ASET (vec, j, XCAR (tail)); + } + return vec; +} + /* Return a vector of font-entities matching with SPEC on FRAME. */ @@ -2831,7 +2858,7 @@ vec[i++] = val; } - val = (i > 0 ? Fvconcat (i, vec) : null_vector); + val = (i > 0 ? font_concat_entities (vec, i) : null_vector); font_add_log ("list", spec, val); return (val); } @@ -5178,6 +5205,14 @@ staticpro (&Vfont_log_deferred); Vfont_log_deferred = Fmake_vector (make_number (3), Qnil); + staticpro (&font_entity_vector_cache); + { /* Here we rely on the fact that syms_of_font is called fairly + late, when QCweakness is known to be set. */ + Lisp_Object args[2]; + args[0] = QCweakness; + args[1] = Qt; + font_entity_vector_cache = Fmake_hash_table (2, args); + } #if 0 #ifdef HAVE_LIBOTF staticpro (&otf_list); Index: fontset.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/fontset.c,v retrieving revision 1.173 diff -u -r1.173 fontset.c --- fontset.c 8 Jun 2009 04:33:40 -0000 1.173 +++ fontset.c 2 Jul 2009 11:06:14 -0000 @@ -525,6 +525,8 @@ { Lisp_Object vec, font_group; int i, charset_matched = -1; + Lisp_Object rfont_def; + int found_index; FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))) ? XFRAME (selected_frame) : XFRAME (FONTSET_FRAME (fontset)); @@ -564,21 +566,22 @@ /* Find the first available font in the vector of RFONT-DEF. */ for (i = 0; i < ASIZE (vec); i++) { - Lisp_Object rfont_def, font_def; + Lisp_Object font_def; Lisp_Object font_entity, font_object; if (i == 0 && charset_matched >= 0) { /* Try the element matching with the charset ID at first. */ - rfont_def = AREF (vec, charset_matched); + found_index = charset_matched; charset_matched = -1; i--; } else if (i != charset_matched) - rfont_def = AREF (vec, i); + found_index = i; else continue; + rfont_def = AREF (vec, found_index); if (NILP (rfont_def)) /* This is a sign of not to try the other fonts. */ return Qt; @@ -623,7 +626,7 @@ } if (font_has_char (f, font_object, c)) - return rfont_def; + goto found; /* Find a font already opened, maching with the current spec, and supporting C. */ @@ -637,7 +640,7 @@ break; font_object = RFONT_DEF_OBJECT (AREF (vec, i)); if (! NILP (font_object) && font_has_char (f, font_object, c)) - return rfont_def; + goto found; } /* Find a font-entity with the current spec and supporting C. */ @@ -661,10 +664,12 @@ for (j = 0; j < i; j++) ASET (new_vec, j, AREF (vec, j)); ASET (new_vec, j, rfont_def); + found_index = j; for (j++; j < ASIZE (new_vec); j++) ASET (new_vec, j, AREF (vec, j - 1)); XSETCDR (font_group, new_vec); - return rfont_def; + vec = new_vec; + goto found; } /* No font of the current spec for C. Try the next spec. */ @@ -673,6 +678,20 @@ FONTSET_SET (fontset, make_number (c), make_number (0)); return Qnil; + + found: + if (fallback && found_index > 0) + { + /* The order of fonts in the fallback font-group is not that + important, and it is better to move the found font to the + first of the group so that the next try will find it + quickly. */ + for (i = found_index; i > 0; i--) + ASET (vec, i, AREF (vec, i - 1)); + ASET (vec, 0, rfont_def); + found_index = 0; + } + return rfont_def; } @@ -685,13 +704,14 @@ { Lisp_Object rfont_def; Lisp_Object base_fontset; + int try_fallback = 0, try_default_fallback = 0; /* Try a font-group of FONTSET. */ rfont_def = fontset_find_font (fontset, c, face, id, 0); if (VECTORP (rfont_def)) return rfont_def; - if (EQ (rfont_def, Qt)) - goto no_font; + if (! EQ (rfont_def, Qt)) + try_fallback = 1; /* Try a font-group of the default fontset. */ base_fontset = FONTSET_BASE (fontset); @@ -703,29 +723,30 @@ rfont_def = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 0); if (VECTORP (rfont_def)) return rfont_def; - if (EQ (rfont_def, Qt)) - goto no_font; + if (! EQ (rfont_def, Qt)) + try_default_fallback = 1; } /* Try a fallback font-group of FONTSET. */ - rfont_def = fontset_find_font (fontset, c, face, id, 1); - if (VECTORP (rfont_def)) - return rfont_def; - if (EQ (rfont_def, Qt)) - goto no_font; + if (try_fallback) + { + rfont_def = fontset_find_font (fontset, c, face, id, 1); + if (VECTORP (rfont_def)) + return rfont_def; + /* Remember that FONTSET has no font for C. */ + FONTSET_SET (fontset, make_number (c), Qt); + } /* Try a fallback font-group of the default fontset . */ - if (! EQ (base_fontset, Vdefault_fontset)) + if (try_default_fallback) { rfont_def = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 1); if (VECTORP (rfont_def)) return rfont_def; + /* Remember that the default fontset has no font for C. */ + FONTSET_SET (FONTSET_DEFAULT (fontset), make_number (c), Qt); } - no_font: - /* Remember that we have no font for C. */ - FONTSET_SET (fontset, make_number (c), Qt); - return Qnil; } From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Stefan Monnier , 3208@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Thu, 02 Jul 2009 21:40:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124657056615514 (code B ref 3208); Thu, 02 Jul 2009 21:40:13 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 2 Jul 2009 21:36:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from smtp-03.vtx.ch (smtp-03.vtx.ch [212.147.0.64]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n62La14i015507 for <3208@emacsbugs.donarmstrong.com>; Thu, 2 Jul 2009 14:36:03 -0700 Received: from alfajor.home (dyn.83-228-178-011.dsl.vtx.ch [83.228.178.11]) by smtp-03.vtx.ch (VTX Services SA) with ESMTP id 80AE7296BF1; Thu, 2 Jul 2009 23:36:00 +0200 (CEST) Received: by alfajor.home (Postfix, from userid 20848) id 408AB64349; Thu, 2 Jul 2009 23:36:00 +0200 (CEST) From: Stefan Monnier To: Kenichi Handa Cc: 3208@debbugs.gnu.org, cyd@stupidchicken.com, jasonr@gnu.org, schierlm@gmx.de Message-ID: References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> <4A4379F7.4000100@gnu.org> Date: Thu, 02 Jul 2009 23:36:00 +0200 In-Reply-To: (Kenichi Handa's message of "Thu, 02 Jul 2009 21:13:12 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Attached is a new patch I propose for 23.1 to solve the bug. > It is not the best one, but is simpler and safer. > I'll summarize the problem here. Yidong and Stefan, please > consider installing it. I think it fixes an important enough new bug that it deserves to be installed. Thank you for working on this. Stefan From unknown Fri Aug 15 04:04:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3208: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) Reply-To: Kenichi Handa , 3208@debbugs.gnu.org Resent-From: Kenichi Handa Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Fri, 03 Jul 2009 02:15:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.1246587119491 (code B ref 3208); Fri, 03 Jul 2009 02:15:06 +0000 Received: (at 3208) by emacsbugs.donarmstrong.com; 3 Jul 2009 02:11:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,FVGT_m_MULTI_ODD, HAS_BUG_NUMBER,IMPRONONCABLE_2,MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n632BsLC000485 for <3208@emacsbugs.donarmstrong.com>; Thu, 2 Jul 2009 19:11:55 -0700 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n632BpU6013515; Fri, 3 Jul 2009 11:11:51 +0900 (JST) env-from (handa@m17n.org) Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n632BpJL029954; Fri, 3 Jul 2009 11:11:51 +0900 (JST) env-from (handa@m17n.org) Received: by smtp2.aist.go.jp with ESMTP id n632BmWk021886; Fri, 3 Jul 2009 11:11:48 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MMYFg-0000uu-8E; Fri, 03 Jul 2009 11:11:48 +0900 From: Kenichi Handa To: Stefan Monnier Cc: 3208@debbugs.gnu.org, cyd@stupidchicken.com, jasonr@gnu.org, schierlm@gmx.de In-Reply-To: (message from Stefan Monnier on Thu, 02 Jul 2009 23:36:00 +0200) References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> <4A3F1B05.7030105@gnu.org> <4A3F7058.902@gnu.org> <4A3F81AC.1070404@gnu.org> <4A420357.8050706@gnu.org> <4A422909.9060800@gnu.org> <4A4379F7.4000100@gnu.org> Date: Fri, 03 Jul 2009 11:11:48 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In article , Stefan Monnier writes: > > Attached is a new patch I propose for 23.1 to solve the bug. > > It is not the best one, but is simpler and safer. > > I'll summarize the problem here. Yidong and Stefan, please > > consider installing it. > I think it fixes an important enough new bug that it deserves to > be installed. Thank you for working on this. Ok, I've just installed them. --- Kenichi Handa handa@m17n.org From unknown Fri Aug 15 04:04:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Michael Schierl Subject: bug#3208 closed by Jason Rumney (Bug was fixed for 23.1) Message-ID: References: <4AAF9D6C.1040303@gnu.org> <49FF3340.2040008@gmx.de> X-Emacs-PR-Message: they-closed 3208 X-Emacs-PR-Package: emacs,w32 Reply-To: 3208@debbugs.gnu.org Date: Tue, 15 Sep 2009 14:05:07 +0000 Content-Type: multipart/mixed; boundary="----------=_1253023507-20532-1" This is a multi-part message in MIME format... ------------=_1253023507-20532-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs,w32 package: #3208: 23.0.93; Memory full / crash when displaying lots of characters from= a large font (like Arial Unicode or Code2000) which is not explicitly sele= cted (on Win32) It has been closed by Jason Rumney . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Jason Rumney by replying to this email. --=20 3208: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3208 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1253023507-20532-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3208-close) by emacsbugs.donarmstrong.com; 15 Sep 2009 13:58:21 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.9 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8FDwJ9V019692 for <3208-close@emacsbugs.donarmstrong.com>; Tue, 15 Sep 2009 06:58:20 -0700 Received: by fxm9 with SMTP id 9so3221585fxm.1 for <3208-close@emacsbugs.donarmstrong.com>; Tue, 15 Sep 2009 06:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:message-id :date:from:user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=Is4YDPaCbWADORySPqfcQekbCYH5dDPpsRmxMebxDwo=; b=bqFIFyTJFtvgBX7jCIW71ZQMV7ZXd4YKhaM8TVSUHBLJC1UzgeyLWZ8Ovw/dgONHRU 2JJIQsCZPIPau7Q3bhsvPQAFxSMPU1gMAX9if+38ttEHPUAr58I4Lp/H1cxcYVkw1ffp FWSsfCAiOia6Cro2ds/F9YH/KPduaSpAxvhDw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=eDJeCfChhfBzErVlmb0LoGBokwlea0xX0VVeRU9qLa51mZVQAqpa84wrPdXEa2Q2jl v9kE4gkc+Fr0EAv24WGzt7j1N23m5ZBlYkVdD0zdfi/3+SfTqWXYGTqE1kRxSj+NwKqu UheyVbtWycQVo7JXOz5a5o2xs882svAO58CMs= Received: by 10.204.13.201 with SMTP id d9mr6335259bka.12.1253023093368; Tue, 15 Sep 2009 06:58:13 -0700 (PDT) Received: from wanchan.jasonrumney.net ([118.101.181.203]) by mx.google.com with ESMTPS id c28sm1382045fka.14.2009.09.15.06.58.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Sep 2009 06:58:12 -0700 (PDT) Sender: Jason Rumney Received: from wanchan.jasonrumney.net (localhost [127.0.0.1]) by wanchan.jasonrumney.net (Postfix) with ESMTP id 741A7F0E for <3208-close@emacsbugs.donarmstrong.com>; Tue, 15 Sep 2009 21:58:05 +0800 (MYT) Message-ID: <4AAF9D6C.1040303@gnu.org> Date: Tue, 15 Sep 2009 21:58:04 +0800 From: Jason Rumney User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: 3208-close@debbugs.gnu.org Subject: Bug was fixed for 23.1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit As subject says, simple fix was made for 23.1, and better fix in trunk by Kenichi Handa ------------=_1253023507-20532-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 4 May 2009 18:26:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.6 required=4.0 tests=FOURLA,MDO_CABLE_TV3 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n44IQSaK022652 for ; Mon, 4 May 2009 11:26:29 -0700 Received: from mail.gnu.org ([199.232.76.166]:49348 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M12rz-0006da-HS for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 14:26:27 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M12ry-0008Bn-17 for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 14:26:27 -0400 Received: from mail.gmx.net ([213.165.64.20]:48443) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M12rx-0008Ay-Dj for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 14:26:25 -0400 Received: (qmail invoked by alias); 04 May 2009 18:26:21 -0000 Received: from p549BC434.dip.t-dialin.net (EHLO [192.168.0.201]) [84.155.196.52] by mail.gmx.net (mp032) with SMTP; 04 May 2009 20:26:21 +0200 X-Authenticated: #13243522 X-Provags-ID: V01U2FsdGVkX1+4eoxdUPm47ilb5YlO2g3q8ATeUuOtVTudGIvoWF hSfkJ0771hPZUM Message-ID: <49FF3340.2040008@gmx.de> Date: Mon, 04 May 2009 20:26:08 +0200 From: Michael Schierl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: emacs-pretest-bug@gnu.org Subject: 23.0.93; Memory full / crash when displaying lots of characters from a large font (like Arial Unicode or Code2000) which is not explicitly selected (on Win32) X-Enigmail-Version: 0.95.7 OpenPGP: id=58B48CDD Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please describe exactly what actions triggered the bug and the precise symptoms of the bug: - It is easier if you have one of the fonts Code2000 or Arial Unicode installed. I tried it with fonts that come with Windows XP (like Lucida Sans Unicode) but did not succeed in reproducing the bug. It might happen with other fonts as well, most likely ones that have lots of glyphs. - You need to know a character that is in your font but not in the default font (0x2203 works for both Arial Unicode and Code2000, 0x2202 would work for Lucida Sans Unicode, 0xFFFD works for Arial Unicode). - Start emacs -Q - Insert a few thousand characters of that kind, and move to the beginning and to the end of the buffer repeatedly. At first you receive warnings like "Emergency (alloc): Warning: past 95% of memory limit", then the memory is exhausted, and if you still go on, you will be asked if you want to debug Emacs. This is perfectly reproducable for me, both on my main machine and on a freshly installed WinXP virtual machine where I only added Emacs and one of the fonts. You can use code like this to insert the characters: like (let ((str (char-to-string (decode-char 'ucs #x2203)))) (dotimes (i 16) (setq str (concat str str))) (insert str) (goto-char (point-min)) (goto-char (point-max)) (goto-char (point-min)) (goto-char (point-max)) (goto-char (point-min)) (goto-char (point-max))) In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600) of 2009-05-02 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: DEU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-y C-x C-e M-x r e p o r t - e m a Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. 65903 ------------=_1253023507-20532-1--