all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1070: Looping in redisplay due to font problem
@ 2008-10-02 23:47 Chong Yidong
  2008-10-03  1:24 ` bug#1071: " Kenichi Handa
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2008-10-02 23:47 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-pretest-bug

After the 2008-07-09 change to ftfont.c, Emacs can loop during redisplay
under the following conditions:

xrdb /dev/null
emacs -Q fc-list.list   [fc-list.list is attached]
<PageDown>
<PageDown>
<PageDown>
<PageDown>

Emacs begins looping while in redisplay, while displaying the text
"Corsivo" (the final letter "o" blinks rapidly).

Strangely enough, I can't reproduce this if I substitute C-v for
PageDown (?!??!).  Also, the bug doesn't show up if there is an X
resource Emacs.geometry already defined.

The problem seems to have appeared for the first time during the checkin
listed below.  My tests indicate that the other files involved this
checkin do not affect the problem.

Could you see if you can reproduce this problem, and review the code
changes to see if they may have caused it?  Thanks!


2008-07-09  Kenichi Handa  <handa@m17n.org>

	* ftfont.c (struct ftfont_info): New member index, delete member
	fc_charset_idx.  Make the member order compatible with struct
	xftfont_info.
	(fc_charset_table): Change charset names to registry names.
	(ftfont_pattern_entity): Delete the args registry and
	fc_charset_idx.  Change the value of :font-entity property
	to (FONTNAME . INDEX).  Always set :registry property to
	`iso10646-1'.
	(struct ftfont_cache_data): New struct.
	(ftfont_lookup_cache): New arg for_face.
	(ftfont_get_fc_charset, ftfont_get_otf): New functions.
	(ftfont_driver): Set the member otf_capability.
	(ftfont_get_charset): Adjust it for the change of
	fc_charset_table.
	(OTF_TAG_SYM): New macro.
	(ftfont_spec_pattern): Delete the arg fc_charset_idx.  Adjust it
	for the change of fc_charset_table.
	(ftfont_list): Adjust it for the change of ftfont_spec_pattern and
	ftfont_pattern_entity.  Add FC_INDEX to objset.
	(ftfont_match): Adjust it for the change of ftfont_spec_pattern
	and ftfont_pattern_entity.
	(ftfont_open): Adjust it for the change of ftfont_lookup_cache,
	font_make_object, struct ftfont_info.
	(ftfont_has_char): Use ftfont_get_fc_charset.
	(ftfont_otf_features, ftfont_otf_capability): New functions.
	(ftfont_shape): Use ftfont_get_otf.
	(ftfont_text_extents): Fix initial setting of metrics.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1070: Looping in redisplay due to font problem
@ 2008-10-02 23:58 Chong Yidong
  0 siblings, 0 replies; 5+ messages in thread
From: Chong Yidong @ 2008-10-02 23:58 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 1070

[-- Attachment #1: Type: text/plain, Size: 84 bytes --]

I forgot to attach the file fclist.list which reproduces this problem:
here it is.


[-- Attachment #2: fc-list.list --]
[-- Type: application/octet-stream, Size: 16775 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1070: Looping in redisplay due to font problem
  2008-10-07 11:26         ` bug#1105: " Kenichi Handa
@ 2008-10-07 16:14           ` Chong Yidong
  2008-10-08  1:16             ` Kenichi Handa
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2008-10-07 16:14 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 1070

> Please try to comment out all calls of XSetClipMask in
> x_draw_glyph_string, and check if Emacs loops in redisplay.

It still loops, though the backtrace is different now.  Interrupting the
loop several times, I see that it gets stuck in two places within
xftfont_draw, at xftfont.c:561 and xftfont.c:549.

Another clue: I can't reproduce this bug on my 32-bit laptop, so maybe
it only shows up on 64-bit machines.


#0  0x00007ffc618cf433 in select () from /lib/libc.so.6
...
#6  0x00007ffc60dd07ad in XRenderCompositeString8 ()
#7  0x00007ffc61fe1aa5 in XftGlyphRender () from /usr/lib/libXft.so.2
#8  0x00007ffc61fdbb1c in XftDrawGlyphs () from /usr/lib/libXft.so.2
#9  0x000000000065618f in xftfont_draw (s=0x7fff6e090ee0, from=0, to=1, x=64, 
    y=149, with_background=1) at xftfont.c:561
        f = (FRAME_PTR) 0x19a52b0
        face = (struct face *) 0x18ee6b0
        xftfont_info = (struct xftfont_info *) 0x1c04810
        xftface_info = (struct xftface_info *) 0xfbc3e0
        xft_draw = (XftDraw *) 0x18088d0
        code = (FT_UInt *) 0x7fff6e090c80
        fg = { pixel = 16113331,
               color = {red = 62965, green = 57054, blue = 46003,
                        alpha = 65535}}
        bg = {pixel = 0, color = {red = 0, green = 0, blue = 0
                                  alpha = 65535}}
        len = 1
        i = 1
#10 0x00000000004e02f6 in x_draw_glyph_string_foreground (s=0x7fff6e090ee0)
    at xterm.c:1316
        font = (struct font *) 0x1c04810
        boff = 0
        y = 149
        i = 0
        x = 64
#11 0x00000000004e374d in x_draw_glyph_string (s=0x7fffd1fa8de0)
    at xterm.c:2708
#12 0x00000000004617cc in draw_glyphs (w=0x1cd5ad0, x=72, row=0x1f6fb20, 
    area=TEXT_AREA, start=7, end=8, hl=DRAW_NORMAL_TEXT, overlaps=0)
    at xdisp.c:20504
#13 0x0000000000466f9c in x_write_glyphs (start=0x1fc1688, len=1)
    at xdisp.c:21913
#14 0x0000000000418fe2 in update_text_area (w=0x1cd5ad0, vpos=8)
    at dispnew.c:4585
...
(gdb) f 9
#9  0x000000000065618f in xftfont_draw (s=0x7fff6e090ee0, from=0, to=1, x=64, 
    y=149, with_background=1) at xftfont.c:561
561         XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont,
(gdb) p *(xftfont_info->xftfont)
$1 = {ascent = 13, descent = 4, height = 15, max_advance_width = 8, 
  charset = 0x7ffc65f0f498, pattern = 0x1647700}



#0  0x00007f44c57e4433 in select () from /lib/libc.so.6
...
#7  0x00007f44c5ef05b1 in XftDrawRect () from /usr/lib/libXft.so.2
#8  0x000000000065601c in xftfont_draw (s=0x7fffd1fa8de0, from=0, to=1, x=64, 
    y=149, with_background=1) at xftfont.c:549
        f = (FRAME_PTR) 0x18a0180
        face = (struct face *) 0x13cd8a0
        xftfont_info = (struct xftfont_info *) 0x1c04810
        xftface_info = (struct xftface_info *) 0xfb65c0
        xft_draw = (XftDraw *) 0x16bcee0
        code = (FT_UInt *) 0x7fffd1fa8b80
        fg = {
          pixel = 16113331, 
          color = { red = 62965, green = 57054, blue = 46003,
                    alpha = 65535 }
        }
        bg = { pixel = 0,
               color = { red = 0, green = 0, blue = 0, alpha = 65535 } }
        len = 1
        i = 8912904
#9  0x00000000004e02f6 in x_draw_glyph_string_foreground (s=0x7fffd1fa8de0)
    at xterm.c:1316
#9  0x00000000004e374d in x_draw_glyph_string (s=0x7fffd1fa8de0)
    at xterm.c:2708
#10 0x00000000004617cc in draw_glyphs (w=0x1cd5ad0, x=72, row=0x1f6fb20, 
    area=TEXT_AREA, start=7, end=8, hl=DRAW_NORMAL_TEXT, overlaps=0)
    at xdisp.c:20504
#11 0x0000000000466f9c in x_write_glyphs (start=0x1fc1688, len=1)
    at xdisp.c:21913
...






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1070: Looping in redisplay due to font problem
  2008-10-07 16:14           ` bug#1070: " Chong Yidong
@ 2008-10-08  1:16             ` Kenichi Handa
  2008-10-08 15:50               ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Kenichi Handa @ 2008-10-08  1:16 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1070

In article <87bpxwcrgk.fsf@cyd.mit.edu>, Chong Yidong <cyd@stupidchicken.com> writes:

> > Please try to comment out all calls of XSetClipMask in
> > x_draw_glyph_string, and check if Emacs loops in redisplay.

> It still loops, though the backtrace is different now.  Interrupting the
> loop several times, I see that it gets stuck in two places within
> xftfont_draw, at xftfont.c:561 and xftfont.c:549.

> Another clue: I can't reproduce this bug on my 32-bit laptop, so maybe
> it only shows up on 64-bit machines.

Ummm.  As I don't have 64-bit machines, it's difficult to
find what is wrong :-(

Do you see the same problem with the different font (or with
the different size of the same font)?
Do you see the same problem when you use only x font-backend?

---
Kenichi Handa
handa@ni.aist.go.jp






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1070: Looping in redisplay due to font problem
  2008-10-08  1:16             ` Kenichi Handa
@ 2008-10-08 15:50               ` Chong Yidong
  0 siblings, 0 replies; 5+ messages in thread
From: Chong Yidong @ 2008-10-08 15:50 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 1070

Kenichi Handa <handa@m17n.org> writes:

> Ummm.  As I don't have 64-bit machines, it's difficult to
> find what is wrong :-(
>
> Do you see the same problem with the different font (or with
> the different size of the same font)?
> Do you see the same problem when you use only x font-backend?

I see the same problem with different sizes of the same font (DejaVu
Sans Mono), but the looping occurs at different places in the buffer.

It doesn't happen with X font backend fonts, nor with other Xft fonts I
tried (DejaVu Sans, Nimbus mono L, Jet, Dimnah, Terminus, Bitstream Vera
Sans Mono).






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-08 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 23:58 bug#1070: Looping in redisplay due to font problem Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2008-10-02 23:47 Chong Yidong
2008-10-03  1:24 ` bug#1071: " Kenichi Handa
2008-10-03 16:18   ` bug#1076: " Chong Yidong
2008-10-06  2:32     ` bug#1097: " Kenichi Handa
2008-10-06 16:37       ` bug#1101: " Chong Yidong
2008-10-07 11:26         ` bug#1105: " Kenichi Handa
2008-10-07 16:14           ` bug#1070: " Chong Yidong
2008-10-08  1:16             ` Kenichi Handa
2008-10-08 15:50               ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.