From: Kenichi Handa <handa@m17n.org>
To: "Marshall, Simon" <Simon.Marshall@misys.com>
Cc: cyd@stupidchicken.com, 3659@emacsbugs.donarmstrong.com
Subject: bug#3659: FW: 23.0.95; crash on set-frame-font
Date: Tue, 28 Jul 2009 11:08:47 +0900 [thread overview]
Message-ID: <E1MVc7T-0006Ds-FW@etlken> (raw)
In-Reply-To: <63C2A154B1708946B60726AFDBA00AC0067E980A@ukmailemea01.misys.global.ad> (Simon.Marshall@misys.com)
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" <Simon.Marshall@misys.com> 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
> #<font-entity nil nil nil nil nil nil nil nil nil nil nil>
> And as expected after the 415 we have:
> (gdb) pp entity
> #<font-entity x nil nil nil nil nil nil nil nil nil nil>
> 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
> #<font-entity x nil nil nil nil nil nil nil nil nil nil>
> 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 <Address 0x2a000000 out of bounds>,
> 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
> #<font-entity x nil nil nil nil nil nil nil nil nil nil>
> 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 <Address 0x2a000000 out of bounds>,
> 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.
next prev parent reply other threads:[~2009-07-28 2:08 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <63C2A154B1708946B60726AFDBA00AC005E5EC5A@ukmailemea01.misys.global.ad>
[not found] ` <87iqinxbs7.fsf@stupidchicken.com>
[not found] ` <63C2A154B1708946B60726AFDBA00AC005EABBA6@ukmailemea01.misys.global.ad>
[not found] ` <87fxdp4ssu.fsf@stupidchicken.com>
[not found] ` <E1MJdlh-0002uT-DA@etlken>
2009-06-25 3:35 ` bug#3659: FW: 23.0.95; crash on set-frame-font Chong Yidong
2009-06-25 6:16 ` Kenichi Handa
2009-06-25 18:32 ` Glenn Morris
2009-06-27 1:13 ` Kenichi Handa
2009-06-27 2:45 ` Glenn Morris
2009-06-27 3:18 ` Chong Yidong
2009-06-28 1:11 ` Glenn Morris
2009-06-28 5:24 ` Chong Yidong
2009-06-29 2:24 ` Kenichi Handa
2009-06-29 6:44 ` Glenn Morris
2009-06-29 7:24 ` Kenichi Handa
2009-06-29 18:34 ` Glenn Morris
2009-06-30 0:45 ` Kenichi Handa
2009-06-30 22:26 ` Glenn Morris
2009-07-09 8:25 ` Marshall, Simon
2009-07-09 14:11 ` Chong Yidong
2009-07-09 14:38 ` Marshall, Simon
2009-07-22 12:21 ` Marshall, Simon
2009-07-22 13:58 ` Chong Yidong
2009-07-23 9:22 ` Marshall, Simon
2009-07-23 11:09 ` Kenichi Handa
[not found] ` <63C2A154B1708946B60726AFDBA00AC00668060C@ukmailemea01.misys.global.ad>
[not found] ` <E1MU9G3-0008Hv-HO@etlke! ! ! ! ! n >
[not found] ` <E1MU9G3-0008Hv-HO@etlke! ! ! ! n>
[not found] ` <E1MU9G3-0008Hv-HO@etlke! ! ! n>
[not found] ` <E1MU9G3-0008Hv-HO@etlke! ! n>
2009-07-24 1:07 ` Kenichi Handa
2009-07-24 8:31 ` Marshall, Simon
2009-07-24 11:08 ` Kenichi Handa
2009-07-24 12:09 ` Marshall, Simon
2009-07-24 12:31 ` Kenichi Handa
[not found] ` <63C2A154B1708946B60726AFDBA00AC00676DBAF@ukmailemea01.misys.global.ad>
2009-07-24 15:28 ` Chong Yidong
2009-07-24 16:01 ` Marshall, Simon
2009-07-26 19:35 ` Chong Yidong
2009-07-27 9:48 ` Marshall, Simon
2009-07-27 1:44 ` Kenichi Handa
[not found] ` <63C2A154B1708946B60726AFDBA00AC0067E980A@ukmailemea01.misys.global.ad>
2009-07-27 16:59 ` Chong Yidong
2009-07-27 17:02 ` Chong Yidong
2009-07-28 2:08 ` Kenichi Handa [this message]
2009-07-28 8:38 ` Marshall, Simon
2009-06-27 2:48 Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2009-06-27 3:08 Chong Yidong
2009-06-28 1:04 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1MVc7T-0006Ds-FW@etlken \
--to=handa@m17n.org \
--cc=3659@emacsbugs.donarmstrong.com \
--cc=Simon.Marshall@misys.com \
--cc=cyd@stupidchicken.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).