From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs 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) Date: Mon, 22 Jun 2009 13:47:49 +0800 Message-ID: <4A3F1B05.7030105@gnu.org> References: <49FF3340.2040008@gmx.de> <4A005A64.5050908@gnu.org> Reply-To: Jason Rumney , 3208@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1245650265 27053 80.91.229.12 (22 Jun 2009 05:57:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2009 05:57:45 +0000 (UTC) Cc: schierlm@gmx.de, 3208@emacsbugs.donarmstrong.com To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 22 07:57:40 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MIcXD-0001RJ-Tl for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2009 07:57:40 +0200 Original-Received: from localhost ([127.0.0.1]:43823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIcXD-0002IK-37 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2009 01:57:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIcX5-0002I1-A4 for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 01:57:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIcX0-0002EH-5B for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 01:57:30 -0400 Original-Received: from [199.232.76.173] (port=42261 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIcWz-0002Dy-US for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 01:57:25 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52657) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIcWz-0003Km-0Q for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 01:57:25 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M5vMYi012209; Sun, 21 Jun 2009 22:57:22 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5M5t5SQ011610; Sun, 21 Jun 2009 22:55:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Jason Rumney Original-Sender: Jason Rumney Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Mon, 22 Jun 2009 05:55:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3208 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by 3208-submit@emacsbugs.donarmstrong.com id=B3208.124564971810650 (code B ref 3208); Mon, 22 Jun 2009 05:55:05 +0000 Original-Received: (at 3208) by emacsbugs.donarmstrong.com; 22 Jun 2009 05:48:38 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 Original-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= Original-Received: by 10.90.87.19 with SMTP id k19mr4930869agb.39.1245649707940; Sun, 21 Jun 2009 22:48:27 -0700 (PDT) Original-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) User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 22 Jun 2009 01:57:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28892 Archived-At: 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.