From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#3659: FW: 23.0.95; crash on set-frame-font Date: Tue, 28 Jul 2009 11:08:47 +0900 Message-ID: References: <63C2A154B1708946B60726AFDBA00AC005E5EC5A@ukmailemea01.misys.global.ad><87iqinxbs7.fsf@stupidchicken.com><63C2A154B1708946B60726AFDBA00AC005EABBA6@ukmailemea01.misys.global.ad><87fxdp4ssu.fsf@stupidchicken.com> <87eit9ugs9.fsf@stupidchicken.com> <63C2A154B1708946B60726AFDBA00AC00628E9C2@ukmailemea01.misys.global.ad><87y6qyeykd.fsf@stupidchicken.com><63C2A154B1708946B60726AFDBA00AC0066199FB@ukmailemea01.misys.global.ad> <87ljmgkeev.fsf@cyd.mit.edu> <63C2A154B1708946B60726AFDBA00AC006680307@ukmailemea01.misys.global.ad> <63C2A154B1708946B60726AFDBA00AC00668060C@ukmailemea01.misys.global.ad> <63C2A154B17 08946B60726AFDBA00AC00676D571@ukmailemea01.misys.global.ad> <63C2A154B1708946B60726AFDBA00AC00676DA9E@ukmailemea01.misys.global.ad> <63C2A154B1708946B60726AFDBA00AC00676DBAF@ukmailemea01.misys.global.ad> <63C2A154B1708946B60726AFDBA00AC0067E980A@ukmailemea01.misys.global.ad> Reply-To: Kenichi Handa , 3659@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1248747475 2050 80.91.229.12 (28 Jul 2009 02:17:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2009 02:17:55 +0000 (UTC) Cc: cyd@stupidchicken.com, 3659@emacsbugs.donarmstrong.com To: "Marshall, Simon" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 04:17:47 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 1MVcGA-0003Gx-27 for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jul 2009 04:17:46 +0200 Original-Received: from localhost ([127.0.0.1]:41919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVcG9-0002ru-Bm for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jul 2009 22:17:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVcG3-0002oD-59 for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2009 22:17:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVcFx-0002g5-VS for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2009 22:17:38 -0400 Original-Received: from [199.232.76.173] (port=39436 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVcFx-0002fo-Lp for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2009 22:17:33 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42375) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MVcFx-000366-3C for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2009 22:17:33 -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 n6S2HUXY026479; Mon, 27 Jul 2009 19:17:30 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6S2F48u025768; Mon, 27 Jul 2009 19:15:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 28 Jul 2009 02:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3659 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3659-submit@emacsbugs.donarmstrong.com id=B3659.124874693824855 (code B ref 3659); Tue, 28 Jul 2009 02:15:04 +0000 Original-Received: (at 3659) by emacsbugs.donarmstrong.com; 28 Jul 2009 02:08:58 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 n6S28pBe024833 for <3659@emacsbugs.donarmstrong.com>; Mon, 27 Jul 2009 19:08:52 -0700 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n6S28m5N012844; Tue, 28 Jul 2009 11:08:48 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n6S28mqg023984; Tue, 28 Jul 2009 11:08:48 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id n6S28lL1001872; Tue, 28 Jul 2009 11:08:47 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MVc7T-0006Ds-FW; Tue, 28 Jul 2009 11:08:47 +0900 In-reply-to: <63C2A154B1708946B60726AFDBA00AC0067E980A@ukmailemea01.misys.global.ad> (Simon.Marshall@misys.com) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 27 Jul 2009 22:17:38 -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:29673 Archived-At: Hi, Simon. Your investigation helps a lot, thank you. I've just installed a fix to the branch and the trunk. Could you please try the latest code? --- Kenichi Handa handa@m17n.org In article <63C2A154B1708946B60726AFDBA00AC0067E980A@ukmailemea01.misys.global.ad>, "Marshall, Simon" writes: > > > #7 0x003337c4 in xfont_chars_supported (chars=9656829, > xfont=0xbf4200, > > > encoding=0x369f30, > > > repertory=0x0) at xfont.c:238 > > > #8 0x0033458c in xfont_supported_scripts (display=0xa0e000, > > > fontname=0xc83dfb "--------0------", > > > props=5454596, encoding=0x369f30) at xfont.c:328 > > > > Your previous backtrace didn't show that > > xfont_supported_scripts is called. It may be because the > > previous backtrace was made by the emacs compiled with -O2. > > > > Anyway, the above fontname has a strange format. For such a > > fontname, xfont_supported_scripts should not be called from > > xfont_list_pattern. > > > > > #9 0x00334e30 in xfont_list_pattern (display=0xa0e000, > > > pattern=0xffbeca84 "-*-*-*-*-*-*-*-*-*-*-*-*-*-*", > registry=5314561, > > > script=5314561) > > > at xfont.c:466 > > > > Please set the breakpoint at xfont.c:414 with conditional: > > buf[1]=='-' && buf[2]=='-' && buf[3]=='-' && buf[4]=='-' > > (I think that is enough for matching with "--------0------") > > > > When emacs stops at that breakpoint, execute the code one > > line by one (by "n" command) until the line 466 (i.e. the > > call of xfont_supported_scripts) while checking why none of > > "if" conditions that leads to "continue" aren't satisfied. > Ok, font_parse_xlfd() returns -1 from font.c:1107, though the return > value is ignored. After xfont.c:414 we have: > (gdb) list > 410 if (i > 0 && xstrcasecmp (indices[i - 1], indices[i]) > == 0) > 411 continue; > 412 entity = font_make_entity (); > 413 xfont_decode_coding_xlfd (indices[i], -1, buf); > 414 font_parse_xlfd (buf, entity); > 415 ASET (entity, FONT_TYPE_INDEX, Qx); > 416 /* Avoid auto-scaled fonts. */ > 417 if (XINT (AREF (entity, FONT_DPI_INDEX)) != 0 > 418 && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0) > 419 continue; > (gdb) pp entity > # > And as expected after the 415 we have: > (gdb) pp entity > # > The condition at 423 is true: > (gdb) list > 418 && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0) > 419 continue; > 420 /* Avoid not-allowed scalable fonts. */ > 421 if (NILP (Vscalable_fonts_allowed)) > 422 { > 423 if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0) > 424 continue; > 425 } > 426 else if (CONSP (Vscalable_fonts_allowed)) > 427 { > So we make the continue at 424 which jumps us to 443: > (gdb) list > 438 if (! CONSP (tail)) > 439 continue; > 440 } > 441 > 442 /* Update encoding and repertory if necessary. */ > 443 if (! EQ (registry, AREF (entity, > FONT_REGISTRY_INDEX))) > 444 { > 445 registry = AREF (entity, FONT_REGISTRY_INDEX); > 446 if (font_registry_charsets (registry, &encoding, > &repertory) < 0) > 447 encoding = NULL; > (gdb) pp registry > nil > (gdb) pp entity > # > The condition at 443 is false which jumps us to 449: > (gdb) list > 444 { > 445 registry = AREF (entity, FONT_REGISTRY_INDEX); > 446 if (font_registry_charsets (registry, &encoding, > &repertory) < 0) > 447 encoding = NULL; > 448 } > 449 if (! encoding) > 450 /* Unknown REGISTRY, not supported. */ > 451 continue; > 452 if (repertory) > 453 { > (gdb) p encoding > $3 = (struct charset *) 0x369f78 > (gdb) p *encoding > $4 = { > id = 707602944, > hash_index = 0, > dimension = 707592192, > code_space = {0, 757727232, 0, 754974720, 0, -1074790400, 0, > 1076101120, 0, 0, 0, 704643072, 0, 628305194, 0, 628304429}, > code_space_mask = 0x2a000000
, > code_linear_p = 627322154, > iso_chars_96 = 0, > iso_final = 707601764, > iso_revision = 0, > emacs_mule_id = 627322149, > ascii_compatible_p = 1677721600, > supplementary_p = 1828716544, > compact_codes_p = 0, > method = 1660944384, > min_code = 0, > max_code = 1677721600, > char_index_offset = 0, > min_char = 1879048192, > max_char = 0, > invalid_code = 627310592, > fast_map = > "\000\000\000\000-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s\000\000\000\000\000\0 > 00\000@$\000\000\000\000\000\000roman\000\000\000charcell\000\000\000\00 > 0\000\000\000\000mono\000\000\000\000proportional\000\000\000\000pixelsi > ze\000\000\000\000\000\000\000Ultra-Light\000\000\000\000\000Light\000\0 > 00\000Semi-Bold\000\000\000\000\000\000\000Bold\000\000\000\000Italic\00 > 0\000Oblique\000weight\000\000sl", > code_offset = 1946157056, > unified_p = 2003395700 > } > (gdb) p repertory > $5 = (struct charset *) 0x0 > So both of those conditions are false, so we reach 459: > (gdb) list > 454 if (NILP (script) > 455 || xfont_chars_supported (chars, NULL, > encoding, repertory)) > 456 list = Fcons (entity, list); > 457 continue; > 458 } > 459 if (memcmp (props, &(AREF (entity, > FONT_FOUNDRY_INDEX)), > 460 sizeof (Lisp_Object) * 7) > 461 || ! EQ (AREF (entity, FONT_SPACING_INDEX), > props[7])) > 462 { > 463 memcpy (props, &(AREF (entity, > FONT_FOUNDRY_INDEX)), > (gdb) pp xfont_scratch_props > [nil nil nil nil nil nil nil nil] > (gdb) pp props[0] > nil > (gdb) pp props[1] > nil > (gdb) pp props[2] > nil > (gdb) pp props[3] > nil > (gdb) pp props[4] > nil > (gdb) pp props[5] > nil > (gdb) pp props[6] > nil > (gdb) pp props[7] > nil > (gdb) pp entity > # > The condition at 459 is true so we go to 463. at the call on 466: > (gdb) p indices[i] > $7 = 0xc7adfb "--------0------" > (gdb) pp xfont_scratch_props > [ nil nil nil nil nil nil] > (gdb) p *encoding > $8 = { > id = 707602944, > hash_index = 0, > dimension = 707592192, > code_space = {0, 757727232, 0, 754974720, 0, -1074790400, 0, > 1076101120, 0, 0, 0, 704643072, 0, 628305194, 0, 628304429}, > code_space_mask = 0x2a000000
, > code_linear_p = 627322154, > iso_chars_96 = 0, > iso_final = 707601764, > iso_revision = 0, > emacs_mule_id = 627322149, > ascii_compatible_p = 1677721600, > supplementary_p = 1828716544, > compact_codes_p = 0, > method = 1660944384, > min_code = 0, > max_code = 1677721600, > char_index_offset = 0, > min_char = 1879048192, > max_char = 0, > invalid_code = 627310592, > fast_map = > "\000\000\000\000-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s\000\000\000\000\000\0 > 00\000@$\000\000\000\000\000\000roman\000\000\000charcell\000\000\000\00 > 0\000\000\000\000mono\000\000\000\000proportional\000\000\000\000pixelsi > ze\000\000\000\000\000\000\000Ultra-Light\000\000\000\000\000Light\000\0 > 00\000Semi-Bold\000\000\000\000\000\000\000Bold\000\000\000\000Italic\00 > 0\000Oblique\000weight\000\000sl", > code_offset = 1946157056, > unified_p = 2003395700 > } > Hope this helps! Let me know what else you would like me to do. > Simon. > "Misys" is the trade name for Misys plc (registered in England and Wales). Registration Number: 01360027. Registered office: One Kingdom Street, London W2 6BL, United Kingdom. For a list of Misys group operating companies please go to http://www.misys.com/corp/About_Us/misys_operating_companies.html. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and Misys plc. Please refer to the executed contrac t between you and the relevant member of the Misys group for the identity of the contracting party with which you are dealing.