From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: bug in display_string? Date: Thu, 26 Sep 2002 22:09:54 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200209261309.WAA13079@etlken.m17n.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1033045936 32610 127.0.0.1 (26 Sep 2002 13:12:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 26 Sep 2002 13:12:16 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17uYRB-0008Te-00 for ; Thu, 26 Sep 2002 15:12:13 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17uZ8v-00037Y-00 for ; Thu, 26 Sep 2002 15:57:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17uYRD-0005LN-00; Thu, 26 Sep 2002 09:12:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17uYP9-00050x-00 for emacs-devel@gnu.org; Thu, 26 Sep 2002 09:10:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17uYP3-0004z8-00 for emacs-devel@gnu.org; Thu, 26 Sep 2002 09:10:04 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17uYP2-0004yY-00 for emacs-devel@gnu.org; Thu, 26 Sep 2002 09:10:00 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6/3.7W-20010518204228) with ESMTP id g8QD9sF22134 for ; Thu, 26 Sep 2002 22:09:54 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.3/3.7W-20010823150639) with ESMTP id g8QD9sd09661 for ; Thu, 26 Sep 2002 22:09:54 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id WAA13079; Thu, 26 Sep 2002 22:09:54 +0900 (JST) Original-To: emacs-devel@gnu.org User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8175 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8175 Emacs crashed when started as below: % emacs -fn -*-*-*-*-*-*-*-*-*-*-*-*-iso8859-1 With this, my X server find some unusual font in that the width of `-' glyph is zero. The crash happened as below, and a possible fix is also attached at the tail. But, I'm not sure it's a correct fix. Gerd, could you please confirm it? (gdb) bt #0 0x40302581 in kill () from /lib/libc.so.6 #1 0x080db36a in abort () at emacs.c:412 #2 0x0807a915 in display_string (string=0x0, lisp_string=942570044, face_string=405492356, face_string_pos=0, start=0, it=0xbfffed24, field_width=0, precision=1, max_x=984, multibyte=0) at xdisp.c:15073 #3 0x080780be in display_mode_element (it=0xbfffed24, depth=2, field_width=0, precision=0, elt=942570044, props=405492356, risky=0) at xdisp.c:13882 #4 0x080786a7 in display_mode_element (it=0xbfffed24, depth=1, field_width=0, precision=0, elt=1479427468, props=405492356, risky=0) at xdisp.c:14107 #5 0x08077abc in display_mode_line (w=0x84efe88, face_id=MODE_LINE_FACE_ID, format=1479427468) at xdisp.c:13689 #6 0x08077936 in display_mode_lines (w=0x84efe88) at xdisp.c:13646 #7 0x0807773d in redisplay_mode_lines (window=1213136520, force=0) at xdisp.c:13604 #8 0x08068a00 in echo_area_display (update_frame_p=1) at xdisp.c:7161 #9 0x08066a8c in message3_nolog (m=944328852, nbytes=19, multibyte=0) at xdisp.c:6058 #10 0x0806683c in message3 (m=944328852, nbytes=19, multibyte=0) at xdisp.c:5999 #11 0x08066d24 in message_with_string (m=0x8189955 "Loading %s...", string=942608956, log=1) at xdisp.c:6144 #12 0x081447d3 in Fload (file=942608956, noerror=405492356, nomessage=405492356, nosuffix=405492356, must_suffix=405492404) at lread.c:876 #13 0x0813246f in do_autoload (fundef=1479320972, funname=406139068) at eval.c:1937 #14 0x081332ee in Ffuncall (nargs=2, args=0xbffff294) at eval.c:2793 #15 0x0815a39c in Fbyte_code (bytestr=941880444, vector=1210317156, maxdepth=6) at bytecode.c:709 #16 0x08133711 in funcall_lambda (fun=1210315876, nargs=0, arg_vector=0xbffff3a8) at eval.c:2920 #17 0x081332d1 in Ffuncall (nargs=1, args=0xbffff3a4) at eval.c:2790 #18 0x0815a39c in Fbyte_code (bytestr=941875880, vector=1210311480, maxdepth=5) at bytecode.c:709 #19 0x08133711 in funcall_lambda (fun=1210311312, nargs=0, arg_vector=0xbffff464) at eval.c:2920 #20 0x08133414 in apply_lambda (fun=1210311312, args=405492356, eval_flag=1) at eval.c:2842 #21 0x081329ce in Feval (form=1480492956) at eval.c:2150 #22 0x080ddbec in top_level_2 () at keyboard.c:1282 #23 0x081317a9 in internal_condition_case (bfun=0x80ddbd8 , handlers=405588940, hfun=0x80dd904 ) at eval.c:1348 #24 0x080ddc1b in top_level_1 () at keyboard.c:1290 #25 0x0813133d in internal_catch (tag=405550244, func=0x80ddbf0 , arg=405492356) at eval.c:1108 #26 0x080ddb5a in command_loop () at keyboard.c:1251 #27 0x080dd6c0 in recursive_edit_1 () at keyboard.c:968 #28 0x080dd7f0 in Frecursive_edit () at keyboard.c:1024 #29 0x080dc673 in main (argc=3, argv=0xbffffab4, envp=0xbffffac4) at emacs.c:1641 #30 0x402f20bf in __libc_start_main () from /lib/libc.so.6 (gdb) up 2 #2 0x080713d5 in display_string (string=0x0, lisp_string=942530652, face_string=405452964, face_string_pos=0, start=0, it=0xbfffed14, field_width=0, precision=1, max_x=984, multibyte=0) at xdisp.c:15073 (gdb) list 15068 } 15069 else 15070 { 15071 /* Glyph is off the left margin of the display area. 15072 Should not happen. */ 15073 abort (); 15074 } 15075 15076 row->ascent = max (row->ascent, it->max_ascent); 15077 row->height = max (row->height, it->max_ascent + it->max_descent); (gdb) p i $1 = 0 (gdb) p nglyphs $2 = 1 (gdb) p *glyph $3 = { charpos = 0, object = 942570044, pixel_width = 0, voffset = 0, type = 0, multibyte_p = 0, left_box_line_p = 0, right_box_line_p = 0, overlaps_vertically_p = 0, padding_p = 0, glyph_not_available_p = 0, face_id = 1, u = { ch = 45, cmp_id = 45, img_id = 45, stretch = { height = 45, ascent = 0 }, val = 45 } } (gdb) p glyph->object $8 = 942570044 (gdb) pr #("-" 0 1 (help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete")) (gdb) p it->truncate_lines_p $4 = 1 (gdb) p x $5 = 0 (gdb) p max_x $6 = 984 (gdb) p it->first_visible_x $7 = 0 Possible fix. *** xdisp.c.~1.786.~ Thu Sep 12 22:11:21 2002 --- xdisp.c Thu Sep 26 22:07:34 2002 *************** *** 15059,15067 **** } break; } ! else if (x + glyph->pixel_width > it->first_visible_x) { ! /* Glyph is at least partially visible. */ ++it->hpos; if (x < it->first_visible_x) it->glyph_row->x = x - it->first_visible_x; --- 15059,15070 ---- } break; } ! else if (glyph->pixel_width == 0 ! ? x >= it->first_visible_x ! : x + glyph->pixel_width > it->first_visible_x) { ! /* Glyph is at least partially visible, or the glyph has ! zero width. */ ++it->hpos; if (x < it->first_visible_x) it->glyph_row->x = x - it->first_visible_x; --- Ken'ichi HANDA handa@m17n.org